/* Module d'enchères Divi - Styles */

.et_pb_auction_module {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* En-tête */
.auction-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    text-align: center;
}

.auction-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-align: center;
    min-height: 2.6em; /* hauteur uniforme même si le titre est sur 1 ou 2 lignes */
}

/* Contenu principal */
.auction-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.auction-left {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.auction-right {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

/* Galerie d'images */
.auction-gallery {
    margin-bottom: 20px;
}

.auction-main-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
}

.auction-featured-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    max-height: 600px;
    object-fit: contain;
}

.auction-featured-image:hover {
    transform: scale(1.05);
}

.auction-main-image::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auction-main-image:hover::after {
    opacity: 1;
}

.auction-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 70px; /* même bloc de miniatures, avec ou sans images */
}

.auction-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.auction-thumbnail:hover {
    border-color: #2ea3f2;
    transform: scale(1.05);
}

.auction-thumbnail.active {
    border-color: #2ea3f2;
    box-shadow: 0 0 8px rgba(46, 163, 242, 0.5);
}

/* Description */
.auction-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

/* Section des enchères */
.auction-bid-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.auction-current-price {
    margin-bottom: 20px;
    text-align: center;
}

.price-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.price-amount {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #8B4513;
}

.auction-end-date {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.date-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.date-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Formulaire d'enchère */
.auction-bid-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bid-firstname-input,
.bid-lastname-input,
.bid-email-input,
.bid-amount-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    text-align: center;
}

.bid-firstname-input:focus,
.bid-lastname-input:focus,
.bid-email-input:focus,
.bid-amount-input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.bid-submit-btn {
    padding: 14px 20px;
    background: #8B4513;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bid-submit-btn:hover {
    background: #654321;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.bid-submit-btn:active {
    transform: translateY(0);
}

.bid-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.auction-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.auction-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auction-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Historique des enchères */
.auction-bid-history {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.auction-bid-history h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.bid-list {
    height: 120px;
    overflow-y: auto;
}

.bid-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #8B4513;
}

.bid-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.bid-user {
    font-weight: 600;
    color: #333;
}

.bid-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2ea3f2;
}

.bid-time {
    font-size: 12px;
    color: #999;
}

.no-bids {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Section des commentaires */
.auction-comments-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.auction-comments-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
}

.auction-comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.comment-name-input,
.comment-text-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 12px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.comment-name-input:focus,
.comment-text-input:focus {
    outline: none;
    border-color: #2ea3f2;
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.1);
}

.comment-text-input {
    resize: vertical;
    min-height: 80px;
}

.comment-submit-btn {
    padding: 12px 24px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-submit-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.auction-comments-list {
    max-height: 500px;
    overflow-y: auto;
}

.comment-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.comment-user {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.no-comments {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

/* Scrollbar personnalisée */
.bid-list::-webkit-scrollbar,
.auction-comments-list::-webkit-scrollbar {
    width: 8px;
}

.bid-list::-webkit-scrollbar-track,
.auction-comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.bid-list::-webkit-scrollbar-thumb,
.auction-comments-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

/* Lightbox pour agrandir les images */
.auction-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.auction-lightbox.active {
    display: flex;
}

.auction-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.auction-lightbox-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.auction-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

.auction-lightbox-close:hover {
    transform: scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.bid-list::-webkit-scrollbar-thumb:hover,
.auction-comments-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bid-item,
.comment-item {
    animation: fadeIn 0.3s ease;
}
