/**
 * CSS Commerce Star Citizen
 * Fichier : public/css/commerce.css
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ======================
   HEADER
====================== */
.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.title {
    font-size: 2.5em;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.subtitle {
    color: #ffffff;
    opacity: 0.8;
    font-size: 1.1em;
}

/* ======================
   TERMINAL WINDOWS
====================== */
.terminal-window {
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid #00ffff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.terminal-header {
    background: linear-gradient(90deg, #001122, #003344);
    padding: 15px 20px;
    border-bottom: 1px solid #00ffff;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: #00ffff;
    font-weight: bold;
    text-transform: uppercase;
}

.status-indicators {
    display: flex;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.status-online { background: #00ff00; }
.status-warning { background: #ffff00; }
.status-error { background: #ff0000; }

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.terminal-content {
    padding: 20px;
}

/* ======================
   STATISTIQUES MARCHÉ
====================== */
.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(0, 50, 100, 0.6);
    border: 1px solid #004466;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.5em;
    color: #00ffff;
    font-weight: bold;
}

.stat-label {
    color: #aaaaaa;
    font-size: 0.9em;
    margin-top: 5px;
}

/* ======================
   FILTRES
====================== */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    color: #00ffff;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.filter-input, .filter-select {
    background: rgba(0, 50, 100, 0.5);
    border: 1px solid #004466;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: inherit;
    transition: all 0.3s;
}

.filter-input:focus, .filter-select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* ======================
   GRILLE DES ANNONCES
====================== */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.listing-card {
    background: linear-gradient(145deg, rgba(0, 30, 60, 0.8), rgba(0, 50, 100, 0.6));
    border: 1px solid #004466;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.listing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    transition: left 0.5s;
}

.listing-card:hover {
    border-color: #00ffff;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
}

.listing-card:hover::before {
    left: 0;
}

/* ======================
   HEADER DES CARTES
====================== */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-name {
    color: #ffffff;
    font-size: 1.1em;
    font-weight: bold;
}

.item-type {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    text-transform: uppercase;
}

/* ======================
   TEMPS DE PUBLICATION
====================== */
.posting-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85em;
    margin-bottom: 12px;
}

.posting-label {
    color: #aaaaaa;
}

.posting-value {
    color: #00ff88;
    font-weight: bold;
}

/* ======================
   CARACTÉRISTIQUES
====================== */
.item-characteristics {
    background: rgba(0, 80, 120, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 12px;
}

.characteristics-title {
    color: #00ffff;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.characteristics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.characteristic-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85em;
}

.characteristic-item:last-child {
    border-bottom: none;
}

.characteristic-label {
    color: #bbbbbb;
}

.characteristic-value {
    color: #ffffff;
    font-weight: bold;
}

/* ======================
   STATISTIQUES VENDEUR
====================== */
.seller-stats {
    background: rgba(0, 100, 150, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 12px;
}

.seller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.seller-name {
    color: #ffffff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.verified-badge {
    background: #00ff88;
    color: #000000;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
}

.reputation-stars {
    display: flex;
    align-items: center;
    gap: 3px;
}

.star {
    color: #ffaa00;
    font-size: 0.9em;
}

.star.empty {
    color: #444444;
}

.reputation-score {
    color: #ffaa00;
    font-weight: bold;
    margin-left: 5px;
    font-size: 0.9em;
}

.seller-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8em;
}

.seller-stat {
    display: flex;
    justify-content: space-between;
    color: #aaaaaa;
}

.seller-stat-value {
    color: #00ffff;
    font-weight: bold;
}

/* ======================
   DÉTAILS ITEM
====================== */
.item-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    color: #aaaaaa;
    font-size: 0.9em;
}

.detail-value {
    color: #ffffff;
    font-weight: bold;
}

/* ======================
   LOCALISATION
====================== */
.location-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #ffaa00;
}

/* ======================
   SECTION PRIX
====================== */
.price-section {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
}

.price {
    font-size: 1.2em;
    color: #00ff88;
    font-weight: bold;
    text-align: center;
}

/* ======================
   BOUTON CONTACT
====================== */
.contact-button {
    width: 100%;
    background: linear-gradient(45deg, #004400, #008800);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-family: inherit;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.contact-button:hover {
    background: linear-gradient(45deg, #006600, #00aa00);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.contact-button:hover::before {
    left: 100%;
}

/* ======================
   PAGINATION
====================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px 0;
}

.pagination-button {
    background: linear-gradient(45deg, #003366, #004488);
    color: #ffffff;
    border: 1px solid #00ffff;
    padding: 10px 15px;
    border-radius: 5px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 45px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.pagination-button:hover {
    background: linear-gradient(45deg, #004488, #0066aa);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    transform: translateY(-1px);
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.pagination-button.disabled:hover {
    background: linear-gradient(45deg, #003366, #004488);
    box-shadow: none;
}

.pagination-button.active {
    background: linear-gradient(45deg, #006600, #008800);
    border-color: #00ff88;
    color: #ffffff;
}

.pagination-info {
    color: #00ffff;
    font-size: 0.9em;
    margin: 0 15px;
}

/* ======================
   MESSAGES & ÉTAT
====================== */
.loading {
    text-align: center;
    padding: 40px;
    color: #00ffff;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.success-message {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    color: #ff6666;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* ======================
   MODAL CONTACT
====================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: linear-gradient(145deg, rgba(0, 30, 60, 0.95), rgba(0, 50, 100, 0.95));
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #00ffff;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    position: relative;
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

.close:hover {
    color: #00ffff;
}

.modal-title {
    color: #00ffff;
    margin-bottom: 20px;
    font-size: 1.2em;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    color: #00ffff;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
}

.form-textarea {
    width: 100%;
    background: rgba(0, 50, 100, 0.5);
    border: 1px solid #004466;
    color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(45deg, #004400, #008800);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #006600, #00aa00);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #444444, #666666);
    color: #ffffff;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #555555, #777777);
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }

    .seller-details {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .pagination-button {
        min-width: 40px;
        padding: 8px 12px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .title {
        font-size: 2em;
    }

    .container {
        padding: 10px;
    }
}