/* Modern Public Interface - Inspired by Otaree */
.immo-public-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.immo-public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stock-title {
    font-size: 32px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-stock {
    font-size: 36px;
}

.stock-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 16px;
}

.stat-lots, .stat-programmes {
    opacity: 0.9;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
}

.search-box input {
    padding: 12px 15px 12px 45px;
    border: none;
    border-radius: 8px;
    width: 300px;
    font-size: 14px;
}

.view-toggle {
    display: flex;
    gap: 5px;
}

.toggle-btn {
    padding: 12px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.1);
}

.toggle-btn.active {
    background: white;
    color: #2c3e50;
    border-color: white;
}

.my-options-btn {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.my-options-btn:hover {
    background: #c0392b;
}

/* Filters */
.immo-filters {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
}

.filter-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Table View */
.immo-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.immo-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.immo-table th {
    padding: 15px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.immo-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.immo-table tbody tr:hover {
    background: #f8f9fa;
}

.immo-table tbody tr.my-option {
    background: #e8f4fd;
    border-left: 4px solid #3498db;
}

.immo-table td {
    padding: 15px 12px;
    font-size: 14px;
    vertical-align: top;
}

.col-plan {
    width: 80px;
}

.floor-plan-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.floor-plan-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 24px;
}

.col-lot {
    min-width: 80px;
}

.col-programme {
    min-width: 200px;
}

.col-dispositifs {
    min-width: 150px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
}

.badge-ptz {
    background: #ffeaa7;
    color: #d63031;
}

.badge-rp {
    background: #dfe6e9;
    color: #2d3436;
}

.badge-pinel {
    background: #fad390;
    color: #e55039;
}

.badge-lmnp {
    background: #74b9ff;
    color: #0984e3;
}

.badge-type {
    display: inline-block;
    padding: 6px 12px;
    background: #e8f4fd;
    color: #3498db;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.tva-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 5px;
}

.rentabilite {
    color: #27ae60;
    font-weight: 600;
}

.col-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.btn-option {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-option:hover {
    background: #2980b9;
}

.btn-release {
    background: #e74c3c;
}

.btn-release:hover {
    background: #c0392b;
}

/* Grid View */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.property-card.my-option {
    border: 3px solid #3498db;
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-image-placeholder {
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.card-content {
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-lot {
    font-weight: 600;
    color: #666;
}

.card-type {
    padding: 4px 10px;
    background: #e8f4fd;
    color: #3498db;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.card-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.card-city {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.card-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.card-specs span {
    font-size: 14px;
    color: #666;
}

.card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-price strong {
    font-size: 24px;
    color: #2c3e50;
}

.card-price span {
    color: #666;
    font-size: 14px;
}

.btn-card {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-card:hover {
    background: #2980b9;
}

.btn-card.btn-release {
    background: #e74c3c;
}

.btn-card.btn-release:hover {
    background: #c0392b;
}

/* Modal */
.immo-modal-public {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.modal-content-public {
    background: white;
    margin: 50px auto;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}

.close-modal-public {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-public:hover {
    color: #333;
}

.my-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.my-option-card {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 20px;
}

.my-option-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.my-option-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.option-price {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin: 15px 0 !important;
}

.option-expires {
    margin-top: 15px !important;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    color: #e74c3c !important;
    font-weight: 600 !important;
}

.loading, .no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

@media (max-width: 1024px) {
    .immo-public-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .header-right {
        flex-wrap: wrap;
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .immo-filters {
        flex-direction: column;
    }

    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .immo-table {
        font-size: 12px;
    }

    .immo-table th,
    .immo-table td {
        padding: 10px 8px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .my-options-grid {
        grid-template-columns: 1fr;
    }
}
