/* simulateur-couleur.css */

.bwa-simulateur-couleur {
    --sim-blue: #3B82F6;
    --sim-blue-dark: #2563EB;
    font-family: var(--font-body, sans-serif);
    color: var(--foreground, #1a1a1a);
    padding: 100px 12px 96px;
}

@media (min-width: 640px) {
    .bwa-simulateur-couleur {
        padding: 128px 24px 80px;
    }
}

@media (min-width: 1024px) {
    .bwa-simulateur-couleur {
        padding: 160px 64px 112px;
    }
}

.bwa-sim__hero {
    max-width: 1440px;
    margin: 0 auto;
}

.bwa-sim__hero-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 40px;
    line-height: 1.15;
    color: var(--foreground, #1a1a1a);
}

.bwa-sim__hero-sub {
    font-size: 1rem;
    color: var(--foreground, #1a1a1a);
    margin: 0 0 8px;
}

.bwa-sim__hero-sub2 {
    font-size: 0.75rem;
    color: #65758b;
    margin: 0 0 8px;
}

.bwa-sim__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .bwa-sim__layout {
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .bwa-sim__layout {
        grid-template-columns: 1fr 400px;
        gap: 40px;
        align-items: start;
    }
}

.bwa-sim__history-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 16px 64px 16px;
}

@media (min-width: 1024px) {
    .bwa-sim__history-section {
        padding: 40px 32px 64px 32px ;
    }
}

.bwa-sim__history-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.bwa-sim__history-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground, #1a1a1a);
    margin: 0;
}

.bwa-sim__history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .bwa-sim__history-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .bwa-sim__history-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.bwa-sim__history-card {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}

.bwa-sim__history-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.bwa-sim__history-card-thumb {
    aspect-ratio: 1;
    width: 100%;
    overflow: hidden;
    background: var(--secondary, #f3f5f6);
}

.bwa-sim__history-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bwa-sim__history-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bwa-sim__history-card-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bwa-sim__history-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bwa-sim__history-card-dot {
        display: flex;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        flex-shrink: 0;
        overflow: hidden;
    }

.bwa-sim__history-card-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bwa-sim__history-card-name {
    font-size: 0.75rem;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--foreground, #1a1a1a);
}

.bwa-sim__history-card-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sim-blue, #3B82F6);
}

.bwa-sim__history-card-date {
    font-size: 0.7rem;
    color: var(--muted-foreground, #65758b);
}

.bwa-sim__history-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.bwa-sim__history-card-restore {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--sim-blue, #3B82F6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    font-family: inherit;
}

.bwa-sim__history-card-restore:hover {
    opacity: 0.9;
}

.bwa-sim__history-card-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--muted-foreground, #65758b);
    transition: color .2s, background .2s;
    font-size: 0.9rem;
}

.bwa-sim__history-card-delete:hover {
    color: #ef4444;
    background: #fef2f2;
}

.bwa-sim__flying-item {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ─── Mobile sticky bottom bar ───────────────────────────────────── */
.bwa-sim__mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 12px 16px 20px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s;
    opacity: 0;
}

.bwa-sim__mobile-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 1024px) {
    .bwa-sim__mobile-bar {
        display: none !important;
    }
}

.bwa-sim__mobile-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bwa-sim__mobile-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.bwa-sim__mobile-bar-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 2px;
    min-width: 0;
}

.bwa-sim__mobile-bar-chips::-webkit-scrollbar {
    display: none;
}

.bwa-sim__mobile-chip {
    position: relative;
    flex-shrink: 0;
}

.bwa-sim__mobile-chip-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--sim-blue, #3B82F6), 0 0 0 3px #fff;
}

.bwa-sim__mobile-chip-circle img,
.bwa-sim__mobile-chip-circle span {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bwa-sim__mobile-chip-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #65758b;
    padding: 0;
    line-height: 1;
    font-size: 11px;
    font-family: inherit;
}

.bwa-sim__mobile-chip-remove:active {
    color: #ef4444;
}

.bwa-sim__mobile-bar-slots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.bwa-sim__mobile-bar-slot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px dashed rgba(101,117,139,0.3);
}

.bwa-sim__mobile-bar-cta {
    flex-shrink: 0;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sim-blue, #3B82F6);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    font-size: 0;
    padding: 0;
}

.bwa-sim__mobile-bar-cta svg {
    width: 16px;
    height: 16px;
    display: block;
}
