/* ==========================================================================
   Netty Immo — Design sobre blanc / lavande (#dbcdef)
   ========================================================================== */

:root {
    --netty-primary: #dbcdef;
    --netty-primary-dark: #b9a3d7;
    --netty-primary-darker: #8b6fb5;
    --netty-text: #2d2d2d;
    --netty-text-light: #666;
    --netty-text-lighter: #999;
    --netty-bg: #fff;
    --netty-bg-light: #faf9fc;
    --netty-border: #e8e4ed;
    --netty-radius: 8px;
    --netty-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --netty-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --netty-transition: 0.2s ease;
    --netty-max-width: 1200px;
}

/* Reset within plugin scope */
.netty-annonces-wrapper *,
.netty-single-wrapper *,
.netty-archive-wrapper * {
    box-sizing: border-box;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.netty-annonces-wrapper,
.netty-archive-container,
.netty-single-container {
    max-width: var(--netty-max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--netty-text);
}

.netty-archive-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--netty-text);
}

/* ==========================================================================
   Filters
   ========================================================================== */

.netty-filters {
    background: var(--netty-bg);
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.netty-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.netty-filter-search {
    flex: 1;
    min-width: 200px;
}

.netty-filter-group input[type="text"],
.netty-filter-group input[type="number"],
.netty-filter-group select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    font-size: 0.875rem;
    color: var(--netty-text);
    background: var(--netty-bg);
    transition: border-color var(--netty-transition);
}

.netty-filter-group input:focus,
.netty-filter-group select:focus {
    outline: none;
    border-color: var(--netty-primary-dark);
    box-shadow: 0 0 0 3px rgba(219, 205, 239, 0.3);
}

.netty-filter-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--netty-text-light);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.netty-filters-advanced {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--netty-border);
}

.netty-filters-advanced .netty-filter-group {
    flex: 1;
    min-width: 140px;
}

.netty-filters-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--netty-border);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.netty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--netty-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--netty-transition);
    text-decoration: none;
    line-height: 1.4;
}

.netty-btn-primary {
    background: var(--netty-primary-darker);
    color: #fff;
    border-color: var(--netty-primary-darker);
}

.netty-btn-primary:hover {
    background: #7a5fa6;
    border-color: #7a5fa6;
    color: #fff;
}

.netty-btn-secondary {
    background: var(--netty-bg);
    color: var(--netty-text-light);
    border-color: var(--netty-border);
}

.netty-btn-secondary:hover {
    border-color: var(--netty-primary-dark);
    color: var(--netty-text);
}

.netty-btn-toggle-advanced {
    background: transparent;
    color: var(--netty-primary-darker);
    border: 1px solid var(--netty-border);
    font-size: 0.8rem;
}

.netty-btn-toggle-advanced:hover {
    background: var(--netty-bg-light);
}

.netty-btn-phone,
.netty-btn-email {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.75rem;
}

.netty-btn-phone {
    background: var(--netty-primary-darker);
    color: #fff;
}

.netty-btn-phone:hover {
    background: #7a5fa6;
    color: #fff;
}

.netty-btn-email {
    background: var(--netty-bg);
    color: var(--netty-primary-darker);
    border: 1px solid var(--netty-primary-dark);
}

.netty-btn-email:hover {
    background: var(--netty-bg-light);
    color: var(--netty-primary-darker);
}

/* ==========================================================================
   Results
   ========================================================================== */

.netty-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.netty-results-count {
    font-size: 0.875rem;
    color: var(--netty-text-light);
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.netty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.netty-card {
    background: var(--netty-bg);
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    overflow: hidden;
    transition: box-shadow var(--netty-transition), transform var(--netty-transition);
}

.netty-card:hover {
    box-shadow: var(--netty-shadow-hover);
    transform: translateY(-2px);
}

.netty-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.netty-card-link:hover {
    color: inherit;
}

.netty-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--netty-bg-light);
}

.netty-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.netty-card:hover .netty-card-image img {
    transform: scale(1.03);
}

.netty-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--netty-text-lighter);
    font-size: 0.875rem;
}

.netty-card-badge {
    position: absolute;
    top: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.netty-badge-type {
    left: 0.75rem;
    background: var(--netty-primary-darker);
    color: #fff;
}

.netty-badge-accroche {
    right: 0.75rem;
    background: #fff;
    color: var(--netty-primary-darker);
    border: 1px solid var(--netty-primary-dark);
}

.netty-badge-etat {
    bottom: 0.75rem;
    top: auto;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.netty-badge-etat-vendu {
    background: #d63638;
}

.netty-badge-etat-loue {
    background: #d63638;
}

.netty-badge-etat-sous-compromis {
    background: #dba617;
    color: #fff;
}

/* Bandeau d'état sur la fiche détail */
.netty-single-etat {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
}

.netty-single-etat-vendu,
.netty-single-etat-loue {
    background: #d63638;
}

.netty-single-etat-sous-compromis {
    background: #dba617;
}

.netty-card-body {
    padding: 1rem;
}

.netty-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--netty-primary-darker);
    margin-bottom: 0.15rem;
}

.netty-card-price-complement {
    font-size: 0.8rem;
    color: var(--netty-text-light);
    margin-bottom: 0.25rem;
}

.netty-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 0.4rem;
    color: var(--netty-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.netty-card-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--netty-text-light);
    margin-bottom: 0.6rem;
}

.netty-card-location svg {
    flex-shrink: 0;
}

.netty-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.netty-feature {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--netty-bg-light);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--netty-text-light);
}

/* DPE badges */
.netty-dpe { font-weight: 600; color: #fff; }
.netty-dpe-a { background: #319834; }
.netty-dpe-b { background: #33cc31; color: #1a5c1a; }
.netty-dpe-c { background: #cbfc34; color: #4a5c00; }
.netty-dpe-d { background: #fbfe06; color: #5c5c00; }
.netty-dpe-e { background: #fbcb02; color: #5c4800; }
.netty-dpe-f { background: #f37020; }
.netty-dpe-g { background: #ee1d23; }

/* ==========================================================================
   Pagination
   ========================================================================== */

.netty-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.netty-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--netty-text);
    background: var(--netty-bg);
    transition: all var(--netty-transition);
}

.netty-pagination .page-numbers:hover {
    border-color: var(--netty-primary-dark);
    background: var(--netty-bg-light);
}

.netty-pagination .page-numbers.current {
    background: var(--netty-primary-darker);
    border-color: var(--netty-primary-darker);
    color: #fff;
}

.netty-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--netty-text-light);
}

/* ==========================================================================
   Single Annonce
   ========================================================================== */

.netty-single-wrapper {
    background: var(--netty-bg-light);
    min-height: 80vh;
}

.netty-back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--netty-primary-darker);
    text-decoration: none;
}

.netty-back-link:hover {
    text-decoration: underline;
    color: var(--netty-primary-darker);
}

.netty-single-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.netty-single-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--netty-text);
}

.netty-single-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--netty-text-light);
}

.netty-single-ref {
    font-size: 0.8rem;
    color: var(--netty-text-lighter);
    margin-top: 0.25rem;
}

.netty-single-header-right {
    text-align: right;
}

.netty-single-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--netty-primary-darker);
}

.netty-single-loyer {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--netty-text);
    margin-top: 0.15rem;
}

.netty-single-charges,
.netty-single-honoraires {
    font-size: 0.8rem;
    color: var(--netty-text-light);
}

.netty-single-accroche {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--netty-primary);
    color: var(--netty-primary-darker);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.netty-gallery {
    margin-bottom: 2rem;
}

.netty-gallery-main {
    border-radius: var(--netty-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: var(--netty-bg);
}

.netty-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.netty-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.netty-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color var(--netty-transition);
}

.netty-thumb:hover,
.netty-thumb.active {
    border-color: var(--netty-primary-darker);
}

.netty-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Single Content Layout
   ========================================================================== */

.netty-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.netty-section {
    background: var(--netty-bg);
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.netty-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--netty-primary);
    color: var(--netty-text);
}

.netty-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.netty-feat {
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.75rem;
    background: var(--netty-bg-light);
    border-radius: 6px;
}

.netty-feat-label {
    font-size: 0.72rem;
    color: var(--netty-text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.netty-feat-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--netty-text);
}

.netty-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--netty-text);
}

.netty-description br + br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

.netty-equipments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.netty-equipments li {
    padding: 0.5rem 0.75rem;
    background: var(--netty-bg-light);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--netty-text);
}

.netty-equipments li::before {
    content: "✓ ";
    color: var(--netty-primary-darker);
    font-weight: 600;
}

/* ==========================================================================
   DPE
   ========================================================================== */

.netty-dpe-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.netty-dpe-block {
    flex: 1;
    min-width: 200px;
}

.netty-dpe-block h4 {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
    color: var(--netty-text-light);
}

.netty-dpe-scale {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.netty-dpe-bar {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    opacity: 0.4;
    transition: all var(--netty-transition);
}

.netty-dpe-bar.active {
    opacity: 1;
    padding: 0.4rem 0.6rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.netty-dpe-letter {
    font-weight: 700;
    min-width: 1.5em;
}

.netty-dpe-value {
    margin-left: auto;
    font-size: 0.7rem;
}

.netty-dpe-bar:nth-child(1) { width: 30%; }
.netty-dpe-bar:nth-child(2) { width: 40%; }
.netty-dpe-bar:nth-child(3) { width: 50%; }
.netty-dpe-bar:nth-child(4) { width: 60%; }
.netty-dpe-bar:nth-child(5) { width: 70%; }
.netty-dpe-bar:nth-child(6) { width: 85%; }
.netty-dpe-bar:nth-child(7) { width: 100%; }

.netty-dpe-bar.active:nth-child(1),
.netty-dpe-bar.active:nth-child(2),
.netty-dpe-bar.active:nth-child(3) {
    color: #1a3a1a;
}

.netty-dpe-bar.active:nth-child(4),
.netty-dpe-bar.active:nth-child(5) {
    color: #3a3000;
}

.netty-dpe-bar.active:nth-child(6),
.netty-dpe-bar.active:nth-child(7) {
    color: #fff;
}

.netty-ges-scale .netty-dpe-bar.active {
    color: #fff;
}

.netty-ges-scale .netty-dpe-bar.active:nth-child(1),
.netty-ges-scale .netty-dpe-bar.active:nth-child(2) {
    color: #4a2040;
}

.netty-dpe-costs {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: var(--netty-text-light);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Map
   ========================================================================== */

.netty-map {
    width: 100%;
    height: 350px;
    border-radius: var(--netty-radius);
    border: 1px solid var(--netty-border);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.netty-single-sidebar {
    position: sticky;
    top: 2rem;
}

.netty-sidebar-card {
    background: var(--netty-bg);
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.netty-sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--netty-text);
}

.netty-nego-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.75rem;
}

.netty-nego-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.netty-nego-name {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--netty-text);
}

.netty-nego-agency {
    text-align: center;
    font-size: 0.8rem;
    color: var(--netty-text-light);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.netty-contact-form {
    background: var(--netty-bg);
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.netty-contact-form h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--netty-text);
}

.netty-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.netty-form-group {
    margin-bottom: 0.75rem;
}

.netty-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--netty-text);
    margin-bottom: 0.25rem;
}

.netty-form-group input,
.netty-form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--netty-border);
    border-radius: var(--netty-radius);
    font-size: 0.85rem;
    color: var(--netty-text);
    font-family: inherit;
    transition: border-color var(--netty-transition);
}

.netty-form-group input:focus,
.netty-form-group textarea:focus {
    outline: none;
    border-color: var(--netty-primary-dark);
    box-shadow: 0 0 0 3px rgba(219, 205, 239, 0.3);
}

.netty-form-consent {
    font-size: 0.75rem;
    color: var(--netty-text-light);
}

.netty-form-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
}

.netty-form-consent input[type="checkbox"] {
    width: auto;
    margin-top: 0.15rem;
}

.netty-form .netty-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.netty-form-status {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    min-height: 1.2em;
}

.netty-form-status.success {
    color: #00a32a;
}

.netty-form-status.error {
    color: #d63638;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .netty-single-content {
        grid-template-columns: 1fr;
    }

    .netty-single-sidebar {
        position: static;
    }

    .netty-single-header {
        flex-direction: column;
    }

    .netty-single-header-right {
        text-align: left;
    }

    .netty-dpe-wrapper {
        flex-direction: column;
    }
}

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

    .netty-filters-bar {
        flex-direction: column;
    }

    .netty-filter-group {
        width: 100%;
    }

    .netty-form-row {
        grid-template-columns: 1fr;
    }

    .netty-single-title {
        font-size: 1.25rem;
    }

    .netty-single-price {
        font-size: 1.4rem;
    }

    .netty-gallery-main img {
        max-height: 300px;
    }

    .netty-features-grid {
        grid-template-columns: 1fr 1fr;
    }
}
