/* HDV.css - Style moderne pour l'Hotel des Ventes */

/* Styles pour l'erreur d'authentification */
.auth-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
}

.auth-error-content {
    background: linear-gradient(135deg, rgba(13, 21, 46, 0.95) 0%, rgba(27, 38, 79, 0.95) 100%);
    border: 2px solid rgba(255, 0, 0, 0.6);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    color: white;
    max-width: 500px;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.3);
}

.auth-error-content h2 {
    color: #ff6b6b;
    font-family: var(--font-title);
    margin-bottom: 1rem;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.auth-error-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-error-loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 107, 0.3);
    border-left: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.main-content {
    min-height: 100vh;
    padding-top: 80px;
}

.hero-section {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 2px solid rgba(0, 168, 255, 0.3);
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 168, 255, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.hdv-interface {
    padding: 2rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hdv-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 168, 255, 0.2);
}

.hdv-tab {
    padding: 1rem 2rem;
    background: rgba(0, 168, 255, 0.1);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-bottom: none;
    color: var(--color-white);
    font-family: var(--font-title);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.hdv-tab.mailbox-tab {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.hdv-tab.mailbox-tab:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.unread-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
    border: 2px solid #fff;
}

.hdv-tab:hover {
    background: rgba(0, 168, 255, 0.2);
    border-color: var(--color-accent);
}

.hdv-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 -3px 10px rgba(0, 168, 255, 0.3);
}

.hdv-panel {
    display: none;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 0 8px 8px 8px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.hdv-panel.active {
    display: block;
}

.hdv-filters {
    background: rgba(0, 168, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 168, 255, 0.3);
}

.filter-row {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-group select,
.search-group input {
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 6px;
    color: var(--color-white);
    font-family: var(--font-text);
    transition: all 0.3s ease;
}

.search-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.search-btn,
.refresh-btn {
    padding: 0.8rem 1.5rem;
    background: var(--color-accent);
    border: none;
    border-radius: 6px;
    color: var(--color-white);
    font-family: var(--font-title);
    cursor: pointer;
    transition: all 0.3s ease;
}

.orders-list {
    min-height: 400px;
}

.order-card {
    background: linear-gradient(135deg, 
        rgba(15, 20, 35, 0.98) 0%, 
        rgba(25, 20, 40, 0.98) 25%,
        rgba(30, 25, 45, 0.98) 50%,
        rgba(25, 20, 40, 0.98) 75%, 
        rgba(15, 20, 35, 0.98) 100%);
    border: 1px solid rgba(0, 168, 255, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(0, 168, 255, 0.15),
        0 2px 8px rgba(138, 43, 226, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 168, 255, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(0, 168, 255, 0.6) 15%, 
        rgba(138, 43, 226, 0.7) 35%,
        rgba(255, 215, 0, 0.8) 50%,
        rgba(138, 43, 226, 0.7) 65%,
        rgba(0, 168, 255, 0.6) 85%,
        transparent 100%);
    animation: mysticalShimmer 4s ease-in-out infinite;
}

@keyframes mysticalShimmer {
    0%, 100% { 
        opacity: 0.4; 
        transform: translateX(-100%) scale(1);
    }
    25% { 
        opacity: 0.8; 
        transform: translateX(-50%) scale(1.1);
    }
    50% { 
        opacity: 1; 
        transform: translateX(0%) scale(1.2);
    }
    75% { 
        opacity: 0.8; 
        transform: translateX(50%) scale(1.1);
    }
}

.order-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(
            circle at 25% 75%, 
            rgba(0, 168, 255, 0.05) 0%, 
            transparent 60%
        ), 
        radial-gradient(
            circle at 75% 25%, 
            rgba(138, 43, 226, 0.04) 0%, 
            transparent 60%
        ),
        radial-gradient(
            circle at 50% 50%, 
            rgba(255, 215, 0, 0.02) 0%, 
            transparent 70%
        );
    pointer-events: none;
    z-index: 1;
}

.order-card:hover {
    transform: translateY(-6px) scale(1.02) rotateX(2deg);
    border-color: rgba(0, 168, 255, 0.7);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 12px 40px rgba(0, 168, 255, 0.25),
        0 8px 24px rgba(138, 43, 226, 0.15),
        0 4px 16px rgba(255, 215, 0, 0.1),
        0 0 40px rgba(0, 168, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 168, 255, 0.3);
}

.order-item-image {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    border: 3px solid rgba(0, 168, 255, 0.5);
    object-fit: cover;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 168, 255, 0.25),
        0 2px 8px rgba(138, 43, 226, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 2;
}

.order-card:hover .order-item-image {
    border-color: rgba(255, 215, 0, 0.8);
    transform: scale(1.1) rotate(3deg);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.6),
        0 12px 32px rgba(0, 168, 255, 0.35),
        0 8px 24px rgba(138, 43, 226, 0.25),
        0 4px 16px rgba(255, 215, 0, 0.2),
        0 0 20px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.order-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    z-index: 2;
}

.order-item-name {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--color-white);
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.order-card:hover .order-item-name {
    color: rgba(0, 168, 255, 0.95);
    text-shadow: 0 2px 12px rgba(0, 168, 255, 0.4);
}

.item-category {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2), rgba(0, 168, 255, 0.1));
    color: rgba(0, 168, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 168, 255, 0.3);
    margin-bottom: 0.3rem;
    margin-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-rarity {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid currentColor;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.order-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.order-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.order-price {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: #feca57;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.order-price-unit {
    font-size: 0.9rem;
    color: rgba(254, 202, 87, 0.7);
    margin-top: -0.2rem;
}

.contact-btn {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-title);
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: #0096e6;
    transform: translateY(-1px);
}

/* Styles pour les onglets */
.my-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.my-orders-header h3 {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-size: 1.5rem;
}

/* Historique des transactions */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.history-header h3 {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-size: 1.5rem;
}

.history-list {
    width: 100%;
}

.history-container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.history-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.history-card.vente {
    border-color: rgba(255, 107, 107, 0.4);
}

.history-card.achat {
    border-color: rgba(52, 152, 219, 0.4);
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.2);
}

.history-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
}

.history-type {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-type.vente {
    color: #ff6b6b;
}

.history-type.achat {
    color: #3498db;
}

.history-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: normal;
    margin-left: 0.5rem;
}

.history-time {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
}

.history-item-info h5 {
    margin: 0 0 0.25rem 0;
    color: white;
    font-size: 1rem;
}

.history-item-info .item-category {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.history-details {
    display: grid;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
}

.history-party,
.history-quantity,
.history-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.history-party strong,
.history-quantity strong,
.history-price strong {
    color: var(--color-accent);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Création d'ordre */
.create-order-header {
    text-align: center;
    margin-bottom: 2rem;
}

.create-order-header h3 {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.order-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.order-type-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-type-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 5px 20px rgba(0, 168, 255, 0.2);
}

.order-type-card.active,
.order-type-card.selected {
    border-color: var(--color-accent);
    background: rgba(0, 168, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.3);
    transform: translateY(-3px);
}

.order-type-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 168, 255, 0.5));
}

.order-type-card[data-type="sell"] .order-type-icon {
    animation: goldenPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
}

.order-type-card[data-type="buy"] .order-type-icon {
    animation: bluePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(0, 168, 255, 0.7));
}

@keyframes goldenPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9)); }
}

@keyframes bluePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(0, 168, 255, 0.7)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 25px rgba(0, 168, 255, 0.9)); }
}

.order-type-card h4 {
    font-family: var(--font-title);
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.order-type-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Formulaire */
.create-order-form {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.order-type-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 168, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 168, 255, 0.3);
}

#order-type-label {
    font-family: var(--font-title);
    color: var(--color-white);
    margin: 0;
    font-size: 1.4rem;
}

#order-type-label.sell {
    color: #ff4757;
}

#order-type-label.buy {
    color: #3742fa;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    font-family: var(--font-title);
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.item-search {
    position: relative;
    margin-bottom: 1rem;
}

.item-search input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 8px;
    color: var(--color-white);
    font-family: var(--font-text);
    font-size: 1rem;
}

.item-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.item-suggestion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.item-suggestion:hover {
    background: rgba(0, 168, 255, 0.2);
}

.item-suggestion img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.selected-item {
    background: rgba(0, 168, 255, 0.1);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

.form-group label {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 6px;
    color: var(--color-white);
    font-family: var(--font-text);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 168, 255, 0.3);
}

.submit-btn,
.cancel-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-family: var(--font-title);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.submit-btn {
    background: #2ed573;
    color: var(--color-white);
}

.submit-btn:hover {
    background: #26d068;
}

.cancel-btn {
    background: #ff4757;
    color: var(--color-white);
}

.cancel-btn:hover {
    background: #ff3838;
}

/* Spinner loading */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 168, 255, 0.3);
    border-left: 4px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hdv-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .hdv-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .hdv-panel {
        padding: 1rem;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: auto;
        width: 100%;
    }
    
    .order-type-selection {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .order-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    /* Amélioration responsive pour les boutons */
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
        justify-content: stretch;
    }
    
    .submit-btn,
    .cancel-btn {
        padding: 1.2rem;
        font-size: 1rem;
        width: 100%;
        min-height: 50px;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .submit-btn,
    .cancel-btn {
        padding: 1rem;
        font-size: 0.9rem;
        min-height: 45px;
    }
    
    .form-actions {
        gap: 0.5rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
}

/* Système de chat intégré */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.chat-modal {
    background: var(--card-background);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 13px 13px 0 0;
    position: relative;
}

.chat-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.chat-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 300px;
    background: rgba(0, 0, 0, 0.05);
}

.system-message {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.system-message p {
    margin: 0.25rem 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

.user-message, .trader-message {
    margin: 1rem 0;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.trader-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    border-bottom-right-radius: 5px;
}

.trader-message .message-content {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 5px;
}

.message-text {
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}

.trader-message .message-time {
    text-align: left;
}

.chat-input-area {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
}

.quick-messages {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-msg {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-msg:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.message-compose {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-compose textarea {
    background: var(--input-background);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--text-color);
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}

.message-compose textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.message-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.8rem;
    color: #888;
}

.send-message {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.send-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Boutons améliorés */
.my-orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.refresh-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.delete-order-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.delete-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
}

.my-order {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(155, 89, 182, 0.05));
}

.status-active {
    color: #2ecc71;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Styles pour le sélecteur d'items */
.item-selection {
    margin-bottom: 1.5rem;
}

.item-selector-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.8), rgba(138, 43, 226, 0.8));
    border: 2px solid rgba(0, 168, 255, 0.6);
    border-radius: 10px;
    color: white;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.item-selector-btn:hover {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.9), rgba(138, 43, 226, 0.9));
    border-color: rgba(0, 168, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}

.selected-item-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), rgba(138, 43, 226, 0.1));
    border: 2px solid rgba(0, 168, 255, 0.4);
    border-radius: 10px;
}

.selected-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(0, 168, 255, 0.5);
    flex-shrink: 0;
}

.selected-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-item-info {
    flex: 1;
}

.selected-item-info h5 {
    margin: 0 0 8px 0;
    color: #00a8ff;
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(0, 168, 255, 0.5);
}

.change-item-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.8), rgba(194, 65, 12, 0.8));
    border: 1px solid rgba(251, 146, 60, 0.6);
    border-radius: 6px;
    color: white;
    font-family: 'Exo 2', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-item-btn:hover {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.9), rgba(194, 65, 12, 0.9));
    border-color: rgba(251, 146, 60, 0.8);
    transform: translateY(-1px);
}

/* Styles pour les boutons d'actions dans le marketplace */
.order-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.8), rgba(138, 43, 226, 0.8));
    color: white;
    border: 2px solid rgba(0, 168, 255, 0.6);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.9), rgba(138, 43, 226, 0.9));
    border-color: rgba(0, 168, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(185, 28, 28, 0.8));
    color: white;
    border: 2px solid rgba(239, 68, 68, 0.6);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.9));
    border-color: rgba(239, 68, 68, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* Styles pour l'en-tête du marketplace */
.marketplace-header {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.1), rgba(138, 43, 226, 0.1));
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.marketplace-header h3 {
    color: #00a8ff;
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.6);
}

.marketplace-header p {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Exo 2', sans-serif;
    margin: 0;
    font-size: 1rem;
}

.orders-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === STYLES TRANSACTION FINALISÉE === */
.order-finalized {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.1) 0%, rgba(0, 100, 0, 0.05) 100%);
    border: 2px solid rgba(34, 139, 34, 0.5);
}

.transaction-finalized {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(34, 139, 34, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.finalized-text {
    color: #4CAF50;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.countdown-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-style: italic;
}

.countdown-text span {
    color: #FFB366;
    font-weight: 600;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* === ACTIONS MES ORDRES === */
.order-actions-my {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.order-actions-my .btn {
    font-size: 13px;
    padding: 6px 12px;
}

/* === NOUVELLE INTERFACE DE CONTACT PERSONNALISÉE === */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.contact-modal {
    background: var(--card-background);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.contact-header {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    position: relative;
}

.contact-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-family: var(--font-title);
}

.contact-header p {
    margin: 0.25rem 0;
    opacity: 0.95;
    font-size: 1rem;
}

.contact-header .order-details {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-compose-area {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.compose-form .form-group {
    margin-bottom: 1.5rem;
}

.compose-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.compose-form input,
.compose-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.compose-form input:focus,
.compose-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.compose-form textarea {
    min-height: 120px;
    line-height: 1.5;
}

.char-counter {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #4CAF50;
    font-weight: 500;
}

.quick-suggestions {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.quick-suggestions h4 {
    margin: 0 0 1rem 0;
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 600;
}

.suggestion-btn {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.suggestion-btn:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(155, 89, 182, 0.2));
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-actions .btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid rgba(108, 117, 125, 0.3);
    color: var(--text-color);
}

.form-actions .btn-secondary:hover {
    background: rgba(108, 117, 125, 0.2);
    transform: translateY(-2px);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border: 2px solid transparent;
    color: white;
}

.form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

/* Modal de finalisation de transaction */
.finalize-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.finalize-modal {
    background: linear-gradient(135deg, rgba(13, 21, 46, 0.98) 0%, rgba(27, 38, 79, 0.98) 100%);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.finalize-header {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2) 0%, rgba(138, 43, 226, 0.2) 100%);
    padding: 1.5rem;
    border-bottom: 2px solid rgba(0, 168, 255, 0.3);
    position: relative;
}

.finalize-header h3 {
    font-family: var(--font-title);
    color: var(--color-accent);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.finalize-header p {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.finalize-content {
    padding: 2rem;
}

.finalize-content .form-group {
    margin-bottom: 1.5rem;
}

.finalize-content label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
    font-size: 1rem;
}

.finalize-content input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 168, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
    transition: all 0.3s ease;
}

.finalize-content input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.2);
}

.finalize-content .hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.finalize-content .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour la modal de contact */
@media (max-width: 768px) {
    .contact-modal {
        width: 98%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .contact-header {
        padding: 1rem;
    }
    
    .message-compose-area {
        padding: 1rem;
    }
    
    .quick-suggestions {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .suggestion-btn {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
        text-align: left;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }

    .finalize-modal {
        width: 95%;
        max-width: none;
    }

    .finalize-content {
        padding: 1.5rem;
    }

    .finalize-content .form-actions {
        flex-direction: column;
    }

    .finalize-content .form-actions .btn {
        width: 100%;
    }
}