/**
 * Styles pour le module d'enchères
 * 
 * @package UMOA
 */

/* Container principal */
.auctions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.auctions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.auctions-header h1 {
    margin: 0;
    font-size: 2rem;
}

/* Filtres */
.auctions-filters {
    margin-bottom: 30px;
    padding: 20px;
}

.filters-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Grille d'enchères */
.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.auction-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auction-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.auction-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.auction-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.auction-card-body {
    padding: 15px;
}

.auction-card-title {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: #333;
}

.auction-card-shop {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 10px 0;
}

.auction-card-price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.auction-card-price-label {
    font-size: 0.75rem;
    color: #999;
    margin: 0 0 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auction-card-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
    margin: 0;
}

.auction-card-buy-now {
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.auction-card-buy-now-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e74c3c;
    margin: 0;
}

.auction-card-timer {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e74c3c;
    font-weight: 500;
    margin: 10px 0;
}

.auction-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Page détail enchère */
.auction-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.auction-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.auction-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auction-header h1 {
    margin: 0 0 15px 0;
    font-size: 2rem;
}

.auction-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.auction-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #f0f0f0;
    border-radius: 8px;
}

.auction-description {
    padding: 20px;
}

.auction-description h2 {
    margin-top: 0;
}

/* Timer */
.auction-timer {
    text-align: center;
    padding: 20px;
}

.timer-display {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c5aa0;
    line-height: 1;
}

.timer-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Prix */
.auction-price-card {
    padding: 20px;
}

.current-price {
    text-align: center;
    margin-bottom: 20px;
}

.price-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.price-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c5aa0;
}

.price-info {
    font-size: 0.9rem;
    color: #666;
}

.price-info p {
    margin: 8px 0;
}

/* Formulaire d'enchère */
.auction-bid-form {
    padding: 20px;
}

.auction-bid-form h3 {
    margin-top: 0;
}

.min-bid-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5aa0;
    padding: 10px;
    background: #f0f7ff;
    border-radius: 4px;
    margin: 10px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f6f;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Historique des enchères */
.auction-history {
    padding: 20px;
}

.bids-list {
    max-height: 400px;
    overflow-y: auto;
}

.bid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.bid-item:last-child {
    border-bottom: none;
}

.bid-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bid-user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.bid-time {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-top: 3px;
}

.bid-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5aa0;
}

/* Watchlist */
#watchlistBtn {
    width: 100%;
    margin-top: 10px;
}

#watchlistBtn.active {
    background: #28a745;
}

/* Buy Now */
#buyNowBtn {
    width: 100%;
    background: #e74c3c;
    color: white;
    margin-top: 10px;
}

#buyNowBtn:hover {
    background: #c0392b;
}

/* Statistiques */
.auction-stats {
    padding: 20px;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.stats-list li:last-child {
    border-bottom: none;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state p {
    font-size: 1.2rem;
    margin: 10px 0;
}

.empty-state-subtitle {
    font-size: 0.9rem;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .auction-layout {
        grid-template-columns: 1fr;
    }
    
    .auctions-grid {
        grid-template-columns: 1fr;
    }
    
    .timer-display {
        gap: 10px;
    }
    
    .timer-value {
        font-size: 2rem;
    }
    
    .auctions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .auction-card-price-section {
        flex-direction: column;
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-info {
    border-left: 4px solid #2c5aa0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
