/* ═══════════════════════════════════════════════════════
 *  Shop Client — Styles
 *  Couleur principale : hérite de --client-primary (MMI V3)
 *  Fallback : #E5A000 (TIRIA Gold)
 * ═══════════════════════════════════════════════════════ */

:root {
    --shop-primary: var(--client-primary, #E5A000);
    --shop-primary-rgb: 229, 160, 0;
    --shop-primary-light: rgba(229, 160, 0, 0.08);
    --shop-primary-lighter: rgba(229, 160, 0, 0.04);
    --shop-primary-hover: #c98e00;
    --shop-primary-dark: #b07d00;
    --shop-success: #1a9a5c;
    --shop-success-light: #e8f8ec;
}

/* ── Boutons Shop ── */
.btn-shop {
    background-color: #E5A000 !important;
    border-color: #E5A000 !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 18px;
    transition: all .25s ease;
    box-shadow: 0 2px 6px rgba(229, 160, 0, 0.25);
}
.btn-shop:hover,
.btn-shop:focus {
    background-color: #c98e00 !important;
    border-color: #c98e00 !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(229, 160, 0, 0.4);
    transform: translateY(-1px);
}
.btn-shop:disabled {
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

.btn-shop-outline {
    background: transparent !important;
    border: 2px solid #E5A000 !important;
    color: #E5A000 !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 5px 16px;
    transition: all .25s ease;
}
.btn-shop-outline:hover,
.btn-shop-outline:focus {
    background-color: #E5A000 !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(229, 160, 0, 0.3);
    transform: translateY(-1px);
}
.btn-shop-outline:disabled {
    opacity: 0.5;
    transform: none;
}

/* ── Badges ── */
.badge-shop {
    background-color: #E5A000 !important;
    color: #fff !important;
    font-weight: 600;
    font-size: .72rem;
    padding: 4px 10px;
}

.badge-shop-light {
    background-color: rgba(229, 160, 0, 0.1) !important;
    color: #b07d00 !important;
    border: 1px solid rgba(229, 160, 0, 0.25);
    font-weight: 500;
}

/* ── Page Header ── */
.page-header .badge-shop {
    font-size: .82rem;
    padding: 6px 16px;
    border-radius: 20px;
}

/* ── Cards ── */
.card {
    border-radius: 10px;
}

/* ── Cards du catalogue ── */
.shop-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px !important;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.shop-card:hover {
    border-color: #E5A000;
    box-shadow: 0 8px 24px rgba(229, 160, 0, 0.15);
    transform: translateY(-3px);
}

.shop-card.is-installed {
    background: linear-gradient(135deg, #fafdf8 0%, #f0faf2 100%);
    border-color: #c8e6cc;
}
.shop-card.is-installed:hover {
    border-color: #1a9a5c;
    box-shadow: 0 8px 24px rgba(26, 154, 92, 0.12);
}

/* ── Status installé ── */
.shop-installed-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1a9a5c;
    font-weight: 700;
    font-size: .8rem;
}
.shop-installed-badge i {
    font-size: 1.1rem;
}

.shop-install-date {
    color: #8b95a2;
    font-size: .72rem;
}

/* ── Mises à jour alert ── */
.shop-alert-success {
    background: linear-gradient(135deg, #f0faf2 0%, #e4f6e8 100%) !important;
    border: 1px solid #b8e6c8 !important;
    color: #1a6b3c !important;
    border-radius: 8px;
    font-weight: 500;
}
.shop-alert-success i {
    color: #1a9a5c;
}

/* ── Card header avec accent doré ── */
.card-header {
    border-bottom: 2px solid rgba(229, 160, 0, 0.1);
}

/* ── Focus dorée sur les inputs ── */
.card .form-control:focus {
    border-color: #E5A000;
    box-shadow: 0 0 0 .2rem rgba(229, 160, 0, 0.15);
}

/* ── Scroll doux ── */
#catalog-container {
    scroll-behavior: smooth;
}

/* ── Animation d'entrée des cards ── */
@keyframes shopCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.shop-card {
    animation: shopCardIn .35s ease forwards;
}
.shop-card:nth-child(2)  { animation-delay: .04s; }
.shop-card:nth-child(3)  { animation-delay: .08s; }
.shop-card:nth-child(4)  { animation-delay: .12s; }
.shop-card:nth-child(5)  { animation-delay: .16s; }
.shop-card:nth-child(6)  { animation-delay: .20s; }
.shop-card:nth-child(7)  { animation-delay: .24s; }
.shop-card:nth-child(8)  { animation-delay: .28s; }

/* ── Spinner gold ── */
.btn-shop .ph-spinner,
.btn-shop-outline .ph-spinner {
    color: inherit;
}

/* ── Carte de mise à jour du Noyau (Premium) ── */
.shop-update-card {
    background: linear-gradient(135deg, rgba(229, 160, 0, 0.08) 0%, rgba(229, 160, 0, 0.02) 100%) !important;
    border: 1px dashed rgba(229, 160, 0, 0.4) !important;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}
.shop-update-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #E5A000;
}
.changelog-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 12px;
}
.changelog-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.changelog-content {
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.6;
}

/* Stepper de progression (Modal de mise à jour) */
.update-stepper {
    text-align: left;
    margin: 15px 0;
}
.step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.step-row:last-child {
    border-bottom: none;
}
.step-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}
.step-icon.pending { color: #94a3b8; }
.step-icon.active { color: #E5A000; display: inline-block; animation: shopSpin 1.5s linear infinite; }
.step-icon.success { color: #16a34a; }
.step-icon.error { color: #dc2626; }
.step-text {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}
.step-text.pending { color: #94a3b8; }
.step-text.active { color: #0f172a; font-weight: 600; }
.step-text.success { color: #16a34a; }
.step-text.error { color: #dc2626; }

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