/* css/for-sale.css - Styles pour le mode "Je Vends" */
/* Style Glassmorphism aligné avec inventory.css */

/* ═══════════════════════════════════════════════════════════════
   CONTAINER PRINCIPAL
   ═══════════════════════════════════════════════════════════════ */

#forSaleContainer {
    padding: 1rem;
}

.forsale-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.forsale-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.forsale-empty h3 {
    margin: 0 0 0.5rem;
    color: rgba(255, 255, 255, 0.9) !important;
}

.forsale-empty p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER AVEC STATS ET ACTIONS (Style Inventaire)
   ═══════════════════════════════════════════════════════════════ */

.forsale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.forsale-header h4 {
    color: #fff !important;
    font-weight: 700 !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 1.4rem !important;
}

.forsale-counts {
    font-size: 0.875rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 4px !important;
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.forsale-counts span {
    color: rgba(255, 255, 255, 0.5) !important;
}

.forsale-total-value {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #10b981 !important;
}

.forsale-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.forsale-action-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.forsale-action-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN EXPORT TEMPLATES
   ═══════════════════════════════════════════════════════════════ */

.forsale-export-dropdown {
    position: relative;
    display: inline-block;
}

.forsale-dropdown-toggle.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.forsale-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 180px;
    background: rgba(30, 30, 40, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 0.5rem 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.forsale-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.forsale-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.forsale-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.forsale-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.forsale-dropdown-label {
    display: block;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   GRILLE DE CARTES (Style Glassmorphism)
   ═══════════════════════════════════════════════════════════════ */

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

.forsale-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.forsale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.forsale-card-image {
    position: relative;
    aspect-ratio: 3/4;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.forsale-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.forsale-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.forsale-card-details {
    padding: 1rem;
    flex: 1;
}

.forsale-card-name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.3;
}

.forsale-card-series {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5) !important;
}

.forsale-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.forsale-condition {
    font-size: 0.8rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7) !important;
}

.forsale-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981 !important;
}

.forsale-description {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
    line-height: 1.4;
}

.forsale-card-actions {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-btn-edit,
.forsale-btn-remove {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    color: rgba(255, 255, 255, 0.7);
}

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

.forsale-btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   BOUTONS (Style Glassmorphism)
   ═══════════════════════════════════════════════════════════════ */

.forsale-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.forsale-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.forsale-btn-primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.forsale-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

.forsale-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.forsale-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.forsale-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.forsale-btn-save {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.forsale-btn-save:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL D'EDITION (Style Glassmorphism)
   ═══════════════════════════════════════════════════════════════ */

.forsale-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forsale-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.forsale-modal-content {
    position: relative;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95) !important;
}

.forsale-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.forsale-modal-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.forsale-modal-body {
    padding: 1.5rem;
}

.forsale-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Preview */
.forsale-card-preview {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.forsale-card-preview img {
    width: 80px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.forsale-card-info {
    flex: 1;
}

.forsale-card-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95) !important;
}

.forsale-card-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.9rem;
}

/* Formulaire */
.forsale-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forsale-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forsale-form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
}

.forsale-form-group input,
.forsale-form-group select,
.forsale-form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.forsale-form-group input::placeholder,
.forsale-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.forsale-form-group input:focus,
.forsale-form-group select:focus,
.forsale-form-group textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.forsale-form-group select option {
    background: #1e1e28;
    color: rgba(255, 255, 255, 0.95);
}

.forsale-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION PRIX SUGGERE
   ═══════════════════════════════════════════════════════════════ */

.forsale-price-suggestion {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.forsale-market-price,
.forsale-suggested-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.forsale-market-price {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.forsale-market-price .label,
.forsale-suggested-price .label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.forsale-market-price .value {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.forsale-suggested-price .value {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forsale-use-suggested {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 0.75rem;
}

.forsale-use-suggested:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.forsale-price-indicator {
    margin-top: 0.75rem;
    text-align: center;
}

.forsale-price-indicator span {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.forsale-price-indicator .price-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.forsale-price-indicator .price-market {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.forsale-price-indicator .price-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON DANS CARD-DETAIL MODAL
   ═══════════════════════════════════════════════════════════════ */

.cdm-btn-sale {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.cdm-btn-sale:hover {
    background: rgba(245, 158, 11, 0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════
   BADGE "A VENDRE" DANS L'INVENTAIRE
   ═══════════════════════════════════════════════════════════════ */

.inventory-card.for-sale::after {
    content: 'A VENDRE';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* ═══════════════════════════════════════════════════════════════
   ONGLETS
   ═══════════════════════════════════════════════════════════════ */

.forsale-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.forsale-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.forsale-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.forsale-tab.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON VENDU
   ═══════════════════════════════════════════════════════════════ */

.forsale-btn-sold {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    color: rgba(255, 255, 255, 0.7);
}

.forsale-btn-sold:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   MODAL MARQUER VENDU
   ═══════════════════════════════════════════════════════════════ */

.forsale-modal-sold {
    max-width: 450px;
}

.forsale-sold-info {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.forsale-sold-asking {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forsale-sold-asking .label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.forsale-sold-asking .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #10b981;
}

.forsale-btn-sold.forsale-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.forsale-btn-sold.forsale-btn:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   STATISTIQUES HISTORIQUE
   ═══════════════════════════════════════════════════════════════ */

.forsale-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.forsale-stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.forsale-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   LISTE HISTORIQUE
   ═══════════════════════════════════════════════════════════════ */

.forsale-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.forsale-history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}

.forsale-history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.forsale-history-image {
    width: 50px;
    height: 70px;
    flex-shrink: 0;
}

.forsale-history-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.forsale-history-info {
    flex: 1;
    min-width: 0;
}

.forsale-history-info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forsale-history-info p {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.forsale-history-platform {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: capitalize;
}

.forsale-history-prices {
    text-align: right;
    min-width: 100px;
}

.forsale-history-final {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981;
}

.forsale-history-profit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.forsale-history-profit.positive {
    color: #10b981;
}

.forsale-history-profit.negative {
    color: #ef4444;
}

.forsale-history-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    min-width: 80px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════════════
   STATS INLINE (VUE EN VENTE)
   ═══════════════════════════════════════════════════════════════ */

.forsale-stats-inline {
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   TOP 5 CARTES
   ═══════════════════════════════════════════════════════════════ */

.forsale-top-cards {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.forsale-top-cards h5 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.forsale-top-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forsale-top-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s;
}

.forsale-top-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.forsale-top-rank {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    min-width: 24px;
}

.forsale-top-img {
    width: 30px;
    height: 42px;
    object-fit: contain;
    border-radius: 3px;
}

.forsale-top-name {
    flex: 1;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forsale-top-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTON PARTAGE
   ═══════════════════════════════════════════════════════════════ */

.forsale-btn-share {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    color: rgba(255, 255, 255, 0.7);
}

.forsale-btn-share:hover {
    background: rgba(102, 126, 234, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   POPUP PARTAGE
   ═══════════════════════════════════════════════════════════════ */

.forsale-share-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forsale-share-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.forsale-share-popup-content {
    position: relative;
    background: rgba(30, 30, 40, 0.98);
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: sharePopupIn 0.2s ease-out;
}

@keyframes sharePopupIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.forsale-share-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-share-popup-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
}

.forsale-share-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    padding: 0;
    line-height: 1;
}

.forsale-share-popup-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.forsale-share-popup-body {
    padding: 1.25rem;
}

.forsale-share-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 0 0 1rem;
    text-align: center;
}

.forsale-share-url-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.forsale-share-url {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.forsale-share-copy {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.forsale-share-copy:hover {
    background: rgba(255, 255, 255, 0.15);
}

.forsale-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.forsale-share-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    transition: transform 0.2s, opacity 0.2s;
}

.forsale-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-whatsapp {
    background: #25D366;
}

.share-telegram {
    background: #0088cc;
}

.share-twitter {
    background: #1DA1F2;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .forsale-header {
        flex-direction: column;
        align-items: stretch;
    }

    .forsale-stats {
        justify-content: space-between;
    }

    .forsale-actions {
        justify-content: center;
    }

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

    .forsale-card-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .forsale-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .forsale-history-item {
        flex-wrap: wrap;
    }

    .forsale-history-date {
        width: 100%;
        text-align: left;
        margin-top: 0.5rem;
    }
}

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

    .forsale-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .forsale-tabs {
        flex-wrap: wrap;
    }

    .forsale-tab {
        flex: 1;
        text-align: center;
    }

    .forsale-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   PHOTOS PERSONNALISEES
   ============================================================ */

.forsale-photos-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.forsale-photos-section > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.forsale-photos-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
    min-height: 80px;
}

.forsale-photos-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 0;
}

.forsale-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.forsale-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.forsale-photo-item:hover img {
    transform: scale(1.05);
}

.forsale-photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.forsale-photo-item:hover .forsale-photo-delete {
    opacity: 1;
}

.forsale-photo-delete:hover {
    transform: scale(1.1);
    background: rgba(239, 68, 68, 1);
}

.forsale-photos-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.forsale-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forsale-btn-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.forsale-photos-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Responsive photos */
@media (max-width: 600px) {
    .forsale-photos-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   STOCK INFO (MULTI-EXEMPLAIRES)
   ============================================================ */

.forsale-stock-info {
    margin-bottom: 1rem;
}

.forsale-stock-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #a5b4fc;
}

.forsale-stock-icon {
    font-size: 1.2rem;
}

.forsale-stock-text {
    font-size: 0.9rem;
    font-weight: 500;
}
