:root { --ds-primary: #3B82F6; --ds-primary-dark: #2563EB; --ds-primary-light: #DBEAFE; }
/* vcl-theme.css — Design Baseline Validée (Light Theme & Complète) */
:root {
    --bg-page: #fcfcfc;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --card-border: #f0f0f0;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    
    --pill-bg: #f2f2f2;
    --pill-text: #333333;
    --pill-active-bg: #111111;
    --pill-active-text: #ffffff;
    
    --primary: #111111;
    --success: #10B981;
    --danger: #EF4444;
    --whatsapp: #25D366;
    --whatsapp-hover: #1EBE5D;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.logo-icon {
    font-size: 1.25rem;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.currency-select {
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    color: #111;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    outline: none;
}

.cart-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SEARCH SECTION */
.search-section {
    padding: 20px 0 6px 0;
}

.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
    border-color: #111;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* CATEGORIES BAR */
.categories-bar {
    padding: 16px 0;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 6px;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background-color: var(--pill-bg);
    color: var(--pill-text);
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.category-pill:hover {
    background-color: #e8e8e8;
}

.category-pill.active {
    background-color: var(--pill-active-bg);
    color: var(--pill-active-text);
    font-weight: 600;
}

/* SECTION HEADER */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 24px 0 20px 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.section-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

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

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .nav-links {
        display: none;
    }
}

@media (max-width: 550px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* PRODUCT CARD */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.product-img-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f7f7f7;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

/* FLOATING WHATSAPP BUTTON */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: var(--whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
    z-index: 90;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}

.floating-whatsapp-btn:hover {
    transform: scale(1.08);
    background-color: var(--whatsapp-hover);
}

/* FOOTER */
.footer {
    margin-top: auto;
    padding: 30px 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* CART OVERLAY / DRAWER */
.cart-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 101;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 16px;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-items-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.btn-checkout {
    background: #111111;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 16px;
    transition: background 0.15s ease;
}

.btn-checkout:hover {
    background: #333333;
}

.icon-btn {
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* PRODUCT DETAIL PAGE */
.product-page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0 60px 0;
}

@media (max-width: 768px) {
    .product-page-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.main-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumb-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumb-img.active {
    border-color: #111;
}

.product-info-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.variant-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.variant-chip-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.variant-chip-btn.active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.btn-add-to-cart {
    background: #111;
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

.btn-whatsapp-buy {
    background: var(--whatsapp);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-whatsapp-buy:hover {
    background: var(--whatsapp-hover);
}

/* CHECKOUT PAGE */
.checkout-container {
    max-width: 600px;
    margin: 30px auto 60px auto;
}

.checkout-box {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.checkout-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}

/* ==========================================
   LOT 1 - RESPONSIVE & ACCESSIBILITY FIXES
   ========================================== */
/* Touch targets (>= 44px) */
.btn, .nav-item, .form-group input, .form-group textarea, .form-select, .search-bar input {
    min-height: 44px;
}
.bottom-nav-item {
    min-height: 44px;
    min-width: 44px;
    padding: 6px 12px;
}

/* Fix small buttons padding ensuring touch size */
.btn-sm {
    min-height: 44px;
    padding: 10px 12px;
}

/* Text Overflow & Wrapping */
* {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
h1, h2, h3, .product-wf-title, .order-card-client, .info-value, .detail-amount-val {
    line-height: 1.5;
    max-width: 100%;
}

/* Ensure forms are spaced well */
.form-group {
    margin-bottom: 16px;
}

/* KPIs and Cards Responsive Grid */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
}
@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
@media (max-width: 350px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Modal responsive safety */
.modal-card, .detail-card, .empty-state-card {
    max-width: 100%;
    box-sizing: border-box;
    margin: auto;
}

/* Prevent horizontal scroll issues */
body, #app, .main-content {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Buttons in cards flex wrap so they don't get cut */
.product-wf-actions, .order-card-actions {
    flex-wrap: wrap;
    gap: 8px;
}

/* Filter chips - safe scrolling without cutting shadows */
.filter-chips {
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
