/* Carte autonome côté couleurs : indépendante du thème (clair OU sombre).
   Toutes les couleurs de texte sont forcées pour éviter l'héritage du thème. */

.shokk-auctions-grid {
    display: grid;
    grid-template-columns: repeat( var(--sa-cols, 4), 1fr );
    gap: 20px;
    margin: 20px 0;
}

/* 2 x 2 sur écrans moyens */
@media (max-width: 1200px) {
    .shokk-auctions-grid {
        grid-template-columns: repeat( 2, 1fr );
    }
}

/* 1 colonne sur mobile */
@media (max-width: 640px) {
    .shokk-auctions-grid {
        grid-template-columns: 1fr;
    }
}

.shokk-auction-card {
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    color: #222;
    box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.06 );
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.shokk-auction-card:hover {
    box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.14 );
    transform: translateY( -2px );
}

.shokk-auction-card .sa-thumb img {
    width: 100%;
    height: 240px;
    object-fit: contain; /* œuvres : on montre l'image complète, jamais recadrée */
    background: #f7f7f9;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

.shokk-auction-card .sa-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #111;
}

.shokk-auction-card .sa-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
}

.shokk-auction-card .sa-desc p {
    color: #555;
}

.sa-status {
    background: #f7f7f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #444;
}

.sa-price {
    color: #444;
}

.sa-price strong {
    font-size: 1.15rem;
    color: #111;
}

.sa-countdown {
    font-size: 0.85rem;
    color: #c0392b;
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

.sa-bid-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.sa-bid-form input {
    padding: 9px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    color: #222;
}

.sa-bid-form input::placeholder {
    color: #9a9a9a;
    opacity: 1; /* Firefox baisse l'opacité par défaut */
}

.sa-bid-btn {
    padding: 10px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.sa-bid-btn:hover:not(:disabled) {
    background: #333;
}

.sa-bid-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sa-msg {
    font-size: 0.85rem;
    min-height: 1em;
}

.sa-msg.sa-ok  { color: #27ae60; }
.sa-msg.sa-err { color: #c0392b; }

.sa-hint {
    font-size: 0.78rem;
    color: #888;
    line-height: 1.35;
    margin-top: 2px;
}

.sa-ended-msg {
    text-align: center;
    padding: 12px;
    background: #fbeaea;
    border-radius: 6px;
    color: #c0392b;
}

/* ---------- Lightbox : œuvre en grand + form de mise ---------- */

.sa-thumb a {
    cursor: zoom-in;
    display: block;
}

.sa-title.sa-clickable {
    cursor: pointer;
}

.sa-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.sa-modal[hidden] {
    display: none;
}

.sa-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba( 0, 0, 0, 0.78 );
}

.sa-modal-box {
    position: relative;
    background: #fff;
    color: #222;
    border-radius: 12px;
    max-width: 1040px;
    width: calc( 100% - 32px );
    max-height: calc( 100vh - 48px );
    margin: 24px auto;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.4 );
}

.sa-modal-media {
    flex: 1 1 58%;
    background: #f2f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.sa-modal-media a {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

.sa-modal-media img {
    max-width: 100%;
    max-height: calc( 100vh - 48px );
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.sa-modal-info {
    flex: 1 1 42%;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.sa-modal-title {
    margin: 0 0 8px;
    color: #111;
    font-size: 1.3rem;
    padding-right: 30px;
}

.sa-modal-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
}

.sa-modal-desc p {
    color: #555;
}

.sa-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba( 0, 0, 0, 0.55 );
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.sa-modal-close:hover {
    background: rgba( 0, 0, 0, 0.8 );
}

.sa-modal.sa-no-image .sa-modal-media {
    display: none;
}

@media (max-width: 800px) {
    .sa-modal-box {
        flex-direction: column;
        overflow-y: auto;
    }
    .sa-modal-media {
        min-height: 0;
    }
    .sa-modal-media img {
        max-height: 45vh;
    }
    .sa-modal-info {
        overflow: visible;
    }
}
