/* ===== Boutons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: var(--fs-base);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--fs-lg);
}

.btn-primary {
    background: linear-gradient(180deg, #f0c74e 0%, #d4af37 100%);
    color: #1a1100;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 2px 8px rgba(212, 175, 55, 0.35);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #f5d465 0%, #e0b945 100%);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 20px rgba(212, 175, 55, 0.45);
    color: #1a1100;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 1px 4px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-border-hover);
    color: var(--color-text);
}

.btn-link {
    background: none;
    color: var(--color-text-muted);
    padding: 0;
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.btn-link:hover {
    color: var(--color-text);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.cta-group {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Cartes ===== */

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===== Hero (page d'accueil) ===== */

.hero {
    text-align: center;
    padding: var(--space-9) 0 var(--space-8);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-baseline {
    font-size: var(--fs-xl);
    color: var(--color-text-muted);
    margin: 0 auto var(--space-7);
    max-width: 640px;
    line-height: 1.5;
}

.error-code {
    font-size: clamp(5rem, 15vw, 9rem) !important;
}

/* ===== Features (cartes accueil) ===== */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-8);
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: inline-block;
}

.feature-card h3 {
    margin-bottom: var(--space-3);
    font-size: var(--fs-xl);
}

.feature-card p {
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ===== Badges ===== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-danger  { background: rgba(239, 68, 68, 0.15);  color: var(--color-danger);  }
.badge-info    { background: rgba(59, 130, 246, 0.15); color: var(--color-info);    }

/* ===== Formulaires ===== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    transition: all var(--transition-fast);
    font-size: var(--fs-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.form-input::placeholder {
    color: var(--color-text-dim);
}

.form-error {
    color: var(--color-danger);
    font-size: var(--fs-sm);
    margin-top: var(--space-2);
}

/* ===== Alertes ===== */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--color-info);
}

/* ===== Authentification (formulaires centrés) ===== */

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px - 96px - 96px);
    padding: var(--space-5) 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-6);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

.auth-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.btn-block {
    display: flex;
    width: 100%;
}

.form-input-error {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.form-hint {
    color: var(--color-text-dim);
    font-size: var(--fs-xs);
    margin-top: var(--space-2);
}

.form-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.form-label-row .form-label {
    margin-bottom: 0;
}

.form-label-link {
    font-size: var(--fs-xs);
    color: var(--color-primary);
    font-weight: 500;
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--space-5);
    }
}

/* ===== Catalogue de boîtes ===== */

.catalog-header {
    text-align: center;
    margin-bottom: var(--space-7);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-header h1 {
    margin-bottom: var(--space-3);
}

.catalog-header p {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    line-height: 1.5;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    margin-bottom: var(--space-7);
}

.filter-pill {
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.filter-pill:hover {
    color: var(--color-text);
    border-color: var(--color-border-hover);
}

.filter-pill.active {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5);
}

.box-card-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
}

.box-card-link-wrapper:hover {
    color: inherit;
}

.box-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.box-card-link-wrapper:hover .box-card {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.box-card-image {
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(ellipse at center, var(--color-primary-soft), transparent 70%),
        linear-gradient(135deg, var(--color-bg-elevated), var(--color-bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--color-text-dim);
    transition: transform var(--transition-slow);
}

.box-card-link-wrapper:hover .box-card-image {
    transform: scale(1.05);
}

.box-card-image-emoji {
    filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.4));
}

.box-card-content {
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.box-card-category {
    display: inline-block;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.box-card-name {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}

.box-card-description {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
    margin-bottom: var(--space-5);
    flex: 1;
}

.box-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.box-price {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.box-card-link {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.box-card-link-wrapper:hover .box-card-link {
    color: var(--color-primary);
}

.empty-state {
    text-align: center;
    padding: var(--space-9) var(--space-5);
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
}

/* ===== Fiche boîte (détail) ===== */

.breadcrumb {
    margin-bottom: var(--space-5);
}

.breadcrumb a {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.box-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    margin-bottom: var(--space-7);
}

.box-detail-image {
    aspect-ratio: 1;
    background:
        radial-gradient(ellipse at center, var(--color-primary-soft), transparent 70%),
        linear-gradient(135deg, var(--color-bg-card), var(--color-bg-elevated));
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9rem;
    color: var(--color-text-dim);
    box-shadow: var(--shadow);
}

.box-detail-image span {
    filter: drop-shadow(0 8px 32px rgba(212, 175, 55, 0.5));
}

.box-detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.box-detail-info h1 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-3);
}

.box-detail-category {
    display: inline-block;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.box-detail-price {
    font-size: var(--fs-4xl);
    font-weight: 800;
    color: var(--color-primary);
    margin: var(--space-5) 0 var(--space-6);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.box-detail-description {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    line-height: 1.6;
    margin-bottom: 0;
}

.box-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-7);
}

.box-stat {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    text-align: center;
}

.box-stat-value {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--space-1);
    line-height: 1.2;
}

.box-stat-label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.box-stat.highlight {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
}

.box-stat.highlight .box-stat-value {
    color: var(--color-primary);
}

.box-stat.highlight .box-stat-label {
    color: var(--color-primary);
}

/* Liste produits possibles */

.products-section {
    margin-top: var(--space-8);
}

.products-section h2 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2);
}

.products-section-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    font-size: var(--fs-base);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.product-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    transition: all var(--transition-fast);
    position: relative;
}

.product-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

.product-card.is-jackpot {
    border-color: var(--color-primary);
    background:
        linear-gradient(180deg, var(--color-primary-soft), transparent),
        var(--color-bg-card);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.15);
}

.product-card.is-jackpot:hover {
    box-shadow: 0 0 32px rgba(212, 175, 55, 0.3);
    border-color: var(--color-primary-hov);
}

.product-card.is-jackpot::before {
    content: "★ JACKPOT";
    position: absolute;
    top: -10px;
    right: var(--space-3);
    background: linear-gradient(180deg, #f0c74e, #d4af37);
    color: #1a1100;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.product-image {
    aspect-ratio: 1;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
    color: var(--color-text-dim);
}

.product-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text);
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-value {
    color: var(--color-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-base);
    margin-bottom: var(--space-3);
}

.product-drop-rate {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.product-drop-rate-pct {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 42px;
}

.product-drop-rate-bar {
    flex: 1;
    height: 4px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.product-drop-rate-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    border-radius: var(--radius-full);
    transition: width var(--transition);
}

@media (max-width: 768px) {
    .box-detail {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }
    .box-detail-image {
        font-size: 6rem;
        max-width: 320px;
        margin: 0 auto;
    }
    .box-detail-price {
        font-size: var(--fs-3xl);
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ===== Checkout (récap d'achat) ===== */

.checkout-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.checkout-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    box-shadow: var(--shadow-lg);
}

.checkout-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-6);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg-elevated);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
}

.checkout-summary-image {
    font-size: 3rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

.checkout-summary-category {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.checkout-summary-name {
    font-size: var(--fs-lg);
    margin: 0 0 var(--space-1);
}

.checkout-summary-description {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0;
}

.checkout-summary-price {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

.checkout-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-5) 0;
}

.checkout-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    font-size: var(--fs-base);
}

.checkout-balance.after {
    border-top: 1px dashed var(--color-border);
    margin-top: var(--space-2);
    padding-top: var(--space-3);
    margin-bottom: var(--space-5);
}

.checkout-balance-label {
    color: var(--color-text-muted);
}

.checkout-balance-value {
    color: var(--color-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.checkout-note {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin-top: var(--space-4);
    line-height: 1.5;
}

/* ===== Top-up (recharge crédit) ===== */

.topup-card {
    max-width: 480px;
}

.topup-amount-input-wrapper {
    position: relative;
}

.topup-amount-input {
    font-size: var(--fs-3xl) !important;
    font-weight: 700 !important;
    text-align: center;
    padding: var(--space-5) var(--space-6) !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.topup-amount-currency {
    position: absolute;
    right: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--fs-2xl);
    color: var(--color-text-muted);
    font-weight: 700;
    pointer-events: none;
}

.topup-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.topup-quick {
    padding: var(--space-3);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--fs-sm);
}

.topup-quick:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.topup-summary-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg-elevated);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
}

.topup-summary-box strong {
    font-size: var(--fs-xl);
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

#payment-element {
    background: transparent;
}

/* ===== Account dashboard ===== */

.account-page {
    max-width: 1024px;
    margin: 0 auto;
}

.account-header {
    margin-bottom: var(--space-7);
}

.account-header h1 {
    margin-bottom: var(--space-2);
}

.account-subtitle {
    color: var(--color-text-muted);
    font-size: var(--fs-base);
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
}

.account-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.account-card-credit {
    grid-column: span 2;
    background:
        linear-gradient(135deg, var(--color-primary-soft), transparent),
        var(--color-bg-card);
    border-color: var(--color-primary);
}

.account-card-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.account-card-value {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.account-card-credit .account-card-value {
    color: var(--color-primary);
    font-size: var(--fs-3xl);
}

.transactions-list {
    margin-top: var(--space-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.transaction-reason {
    color: var(--color-text);
    font-weight: 500;
}

.transaction-date {
    color: var(--color-text-dim);
    font-size: var(--fs-xs);
}

.transaction-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: var(--fs-base);
}

.transaction-credit_in  { color: var(--color-success); }
.transaction-credit_out { color: var(--color-text-muted); }

@media (max-width: 600px) {
    .account-card-credit { grid-column: span 1; }
    .topup-quick-amounts { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Opening (ouverture animée) ===== */

.opening-page {
    max-width: 1024px;
    margin: 0 auto;
    min-height: 60vh;
}

.opening-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.opening-stage[data-stage="ready"] {
    transition: opacity 350ms, transform 350ms;
}

.opening-stage[data-stage="ready"].is-closing {
    opacity: 0;
    transform: scale(0.92);
}

.opening-box-container {
    text-align: center;
    position: relative;
    padding: var(--space-7);
}

/* Wrapper qui isole la boîte + ses effets pour les centrer ensemble,
   sans inclure le titre / sous-titre / bouton dans le calcul du centre. */
.opening-box-stack {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: -moz-fit-content;
    width: fit-content;
}

.opening-box-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

.opening-box-glow.is-intense {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle,
        rgba(212, 175, 55, 0.7),
        rgba(212, 175, 55, 0.3) 30%,
        transparent 70%);
    animation: pulse-glow 0.8s ease-in-out infinite;
}

.opening-box-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(212, 175, 55, 0.15) 10deg,
        transparent 30deg,
        transparent 60deg,
        rgba(212, 175, 55, 0.15) 70deg,
        transparent 90deg,
        transparent 120deg,
        rgba(212, 175, 55, 0.15) 130deg,
        transparent 150deg,
        transparent 180deg,
        rgba(212, 175, 55, 0.15) 190deg,
        transparent 210deg,
        transparent 240deg,
        rgba(212, 175, 55, 0.15) 250deg,
        transparent 270deg,
        transparent 300deg,
        rgba(212, 175, 55, 0.15) 310deg,
        transparent 330deg
    );
    opacity: 0;
}

.opening-box-rays.is-spinning {
    opacity: 1;
    animation: rays-spin 4s linear infinite;
}

.opening-box-icon.is-shaking {
    animation: box-shake 0.4s ease-in-out infinite, box-float 3s ease-in-out infinite;
}

/* SVG box premium (remplace l'emoji 📦) */
.opening-box-svg {
    width: 340px;
    height: 370px;
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(212, 175, 55, 0.5));
}

/* Phase READY : version "imposante" du démarrage */
[data-stage="ready"] .opening-box-svg {
    width: 400px;
    height: 440px;
    filter: drop-shadow(0 24px 48px rgba(212, 175, 55, 0.55));
}

[data-stage="ready"] .opening-box-glow {
    width: 520px;
    height: 520px;
}

[data-stage="ready"] .opening-box-rays {
    width: 800px;
    height: 800px;
    opacity: 0.5;
    animation: rays-spin 30s linear infinite;
}

[data-stage="ready"] .opening-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-top: var(--space-5);
}

[data-stage="ready"] .opening-subtitle {
    font-size: var(--fs-xl);
    margin-bottom: var(--space-7);
}

[data-stage="ready"] .opening-box-container {
    padding: var(--space-8) var(--space-5);
}

@media (max-width: 600px) {
    [data-stage="ready"] .opening-box-svg {
        width: 280px;
        height: 308px;
    }
    [data-stage="ready"] .opening-box-glow {
        width: 360px;
        height: 360px;
    }
    [data-stage="ready"] .opening-box-rays {
        width: 500px;
        height: 500px;
    }
}

.opening-box-icon {
    /* Override : on retire l'ancien styling emoji */
    font-size: 0;
    line-height: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opening-box-icon .opening-box-svg {
    display: block;
    margin: 0;
}

.opening-box-bow {
    transform-origin: 120px 65px;
    animation: bow-wiggle 4s ease-in-out infinite;
}

@keyframes bow-wiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50%      { transform: rotate(-2deg) scale(1.03); }
}

.opening-suspense-text {
    color: var(--color-primary);
    font-size: var(--fs-xl);
    font-weight: 700;
    margin-top: var(--space-5);
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
    position: relative;
    z-index: 1;
    animation: text-pulse 0.8s ease-in-out infinite;
}

/* ===== Roulette multi-strips parallèles ===== */

.roulette-header {
    text-align: center;
    margin-bottom: var(--space-5);
}

.roulette-header h2 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-1);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roulette-header p {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

.roulette-multi {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.roulette-row {
    position: relative;
    height: 100px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 200ms, box-shadow 200ms;
}

.roulette-row.is-landed {
    border-color: var(--color-primary);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}

.roulette-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.7);
    z-index: 5;
    pointer-events: none;
}

.roulette-marker::before,
.roulette-marker::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}
.roulette-marker::before {
    top: -2px;
    border-top: 10px solid var(--color-primary);
}
.roulette-marker::after {
    bottom: -2px;
    border-bottom: 10px solid var(--color-primary);
}

.roulette-track {
    overflow: hidden;
    height: 100%;
    position: relative;
}

.roulette-strip {
    display: flex;
    gap: 12px;
    will-change: transform;
    height: 100%;
    align-items: center;
    padding-left: 50%;
}

.roulette-item {
    flex-shrink: 0;
    width: 100px;
    height: 88px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    transition: all 200ms;
}

.roulette-item.is-jackpot {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.18), var(--color-bg-elevated));
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.roulette-item.is-target.is-landed {
    transform: scale(1.08);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.25), var(--color-bg-card));
    border-color: var(--color-primary);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.6);
}

.roulette-item-emoji {
    font-size: 1.75rem;
    margin-bottom: 2px;
    line-height: 1;
}

.roulette-item-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.15;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.roulette-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 4;
}
.roulette-fade-left {
    left: 0;
    background: linear-gradient(90deg, var(--color-bg-card) 0%, transparent 100%);
}
.roulette-fade-right {
    right: 0;
    background: linear-gradient(-90deg, var(--color-bg-card) 0%, transparent 100%);
}

/* ===== Boutons UI (mute, skip) ===== */

.opening-mute-btn {
    position: fixed;
    top: calc(72px + var(--space-4));
    right: var(--space-5);
    width: 44px;
    height: 44px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.opening-mute-btn:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.opening-skip-btn {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    padding: var(--space-3) var(--space-5);
    background: rgba(28, 28, 42, 0.95);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    color: var(--color-primary);
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
    z-index: 200;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 175, 55, 0.2);
    transition: all 200ms;
    animation: skip-pulse 2s ease-in-out infinite;
}
.opening-skip-btn:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    transform: scale(1.05);
}
@keyframes skip-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 175, 55, 0.2); }
    50%      { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 24px rgba(212, 175, 55, 0.5); }
}

/* ============================================================
   Live drops feed (preuve sociale, fixed bottom-right)
============================================================ */

.live-drops {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    width: 320px;
    max-width: calc(100vw - 2 * var(--space-5));
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 90;
    pointer-events: none;
}

.live-drop {
    background: rgba(28, 28, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    animation: live-drop-in 350ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.live-drop.is-leaving {
    animation: live-drop-out 350ms ease-in forwards;
}

@keyframes live-drop-in {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes live-drop-out {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(120%); opacity: 0; }
}

.live-drop.is-jackpot {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(28, 28, 42, 0.95));
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 24px rgba(212, 175, 55, 0.35);
}

.live-drop-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.live-drop.is-jackpot .live-drop-icon {
    animation: jackpot-icon-spin 2s ease-in-out infinite;
}

@keyframes jackpot-icon-spin {
    0%, 100% { transform: rotate(-15deg) scale(1); }
    50%      { transform: rotate(15deg) scale(1.15); }
}

.live-drop-body {
    flex: 1;
    min-width: 0;
}

.live-drop-line {
    color: var(--color-text);
    font-size: var(--fs-sm);
    line-height: 1.4;
}

.live-drop-line strong {
    color: var(--color-primary);
    font-weight: 700;
}

.live-drop.is-jackpot .live-drop-line:first-child strong {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.live-drop-meta {
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    margin-top: 2px;
}

@media (max-width: 600px) {
    .live-drops {
        bottom: var(--space-3);
        right: var(--space-3);
        left: var(--space-3);
        width: auto;
    }
    .live-drop { font-size: var(--fs-xs); }
}

/* ============================================================
   Loading state sur les boutons (form submit)
============================================================ */

button.is-loading,
input[type="submit"].is-loading {
    cursor: progress;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.opening-box-icon {
    font-size: 9rem;
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-5);
    filter: drop-shadow(0 12px 32px rgba(212, 175, 55, 0.6));
    animation: box-float 3s ease-in-out infinite;
}

@keyframes box-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.opening-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.opening-subtitle {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 1;
}

.opening-suspense {
    text-align: center;
}

.opening-spinner {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-accent);
    margin: 0 auto var(--space-5);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.opening-text {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.opening-reveal-header {
    text-align: center;
    margin-bottom: var(--space-7);
}

.opening-reveal-header h1 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-3);
    animation: fade-in-up 0.5s ease-out both;
}

.opening-summary {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
    animation: fade-in-up 0.6s ease-out 0.1s both;
}

.opening-summary strong {
    color: var(--color-primary);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.opening-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-7);
    width: 100%;
}

.opening-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    position: relative;
    opacity: 0;
    /* L'animation est déclenchée par .is-revealed (posée par JS) au moment du tour de l'item */
}

.opening-item.is-revealed {
    animation: item-pop-in 0.7s var(--ease-out-back) forwards;
}

.opening-item.is-jackpot {
    background:
        linear-gradient(180deg, var(--color-primary-soft), transparent),
        var(--color-bg-card);
    border-color: var(--color-primary);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

.opening-item.is-jackpot.is-revealed {
    animation: jackpot-pop-in 1.2s var(--ease-out-back) forwards;
}

/* Pulse continu sur le jackpot après reveal */
.opening-item.is-jackpot.is-revealed::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-primary);
    animation: jackpot-pulse 2s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
}

@keyframes jackpot-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.04); }
}

.opening-item-jackpot-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #f0c74e, #d4af37);
    color: #1a1100;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
    white-space: nowrap;
}

.opening-item-image {
    font-size: 3.5rem;
    margin-bottom: var(--space-3);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.opening-item-name {
    font-size: var(--fs-base);
    margin-bottom: var(--space-2);
    color: var(--color-text);
    line-height: 1.3;
}

.opening-item-value {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

.opening-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}

.opening-note {
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-4);
    background: var(--color-bg-elevated);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.opening-note strong {
    color: var(--color-warning);
}

/* ===== Inventaire ===== */

.inventory-page {
    max-width: 1100px;
    margin: 0 auto;
}

.inventory-header {
    margin-bottom: var(--space-7);
}

.inventory-header h1 {
    margin-bottom: var(--space-2);
}

.inventory-subtitle {
    color: var(--color-text-muted);
    font-size: var(--fs-lg);
}

.inventory-section {
    margin-bottom: var(--space-8);
}

.inventory-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-xl);
    margin-bottom: var(--space-2);
}

.inventory-section-count {
    background: var(--color-bg-elevated);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    font-variant-numeric: tabular-nums;
}

.inventory-section-help {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
    margin-bottom: var(--space-5);
    max-width: 800px;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.inv-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: border-color var(--transition-fast);
}

.inv-card:hover {
    border-color: var(--color-border-hover);
}

.inv-card-product {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.inv-card-image {
    width: 72px;
    height: 72px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.inv-card-info {
    flex: 1;
    min-width: 0;
}

.inv-card-info h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.inv-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.inv-card-meta strong {
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.inv-card-value strong {
    color: var(--color-primary);
    font-weight: 700;
}

.inv-card-deadline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.inv-card-deadline.is-urgent {
    color: var(--color-warning);
    font-weight: 600;
}

.inv-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.inv-action-form {
    margin: 0;
    display: contents;
}

.inv-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-3);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    width: 100%;
    line-height: 1.3;
}

.inv-action:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    background: var(--color-bg-card);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: var(--color-text);
}

.inv-action-icon {
    font-size: 1.75rem;
    margin-bottom: var(--space-1);
}

.inv-action-label {
    font-weight: 600;
    font-size: var(--fs-sm);
}

.inv-action-price {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.inv-action-buyback {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.08), var(--color-bg-elevated));
    border-color: rgba(212, 175, 55, 0.3);
}

.inv-action-buyback:hover {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), var(--color-bg-card));
    border-color: var(--color-primary);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.2);
}

.inv-action-buyback .inv-action-price {
    color: var(--color-primary);
    font-weight: 700;
}

.inv-card-shipping .inv-card-image {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.inventory-history {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.inv-history-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--fs-sm);
}

.inv-history-row:last-child {
    border-bottom: none;
}

.inv-history-product {
    color: var(--color-text);
    font-weight: 500;
}

.inv-history-date {
    color: var(--color-text-dim);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .inv-card-actions {
        grid-template-columns: 1fr;
    }
    .inv-card-meta {
        gap: var(--space-2);
        flex-direction: column;
    }
}

/* ===== Marketplace ===== */

.marketplace-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-7);
}

.marketplace-controls .catalog-filters {
    margin-bottom: 0;
    justify-content: flex-start;
}

.marketplace-sort {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.form-label-inline {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    white-space: nowrap;
}

.form-select-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--fs-sm);
    width: auto;
}

.mp-listing-card {
    position: relative;
}

.mp-own-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--color-accent);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.mp-listing-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.mp-listing-meta strong {
    color: var(--color-text);
    font-weight: 600;
}

.mp-listing-value {
    font-size: var(--fs-xs);
    color: var(--color-text-dim);
}

.mp-savings {
    display: inline-block;
    margin-top: var(--space-1);
    font-size: var(--fs-xs);
    color: var(--color-success);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Détail marketplace */

.mp-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-bg-elevated);
    border-radius: var(--radius);
    margin: var(--space-5) 0;
}

.mp-detail-meta > div {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.mp-detail-meta-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
}

.mp-detail-meta-value {
    color: var(--color-text);
    font-weight: 600;
    font-size: var(--fs-base);
}

@media (max-width: 600px) {
    .marketplace-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .marketplace-controls .catalog-filters {
        justify-content: center;
    }
    .marketplace-sort {
        justify-content: center;
    }
}

