:root {
    --cl-slate-900: #0f172a;
    --cl-slate-800: #1e293b;
    --cl-slate-700: #334155;
    --cl-slate-600: #475569;
    --cl-slate-500: #64748b;
    --cl-slate-200: #e2e8f0;
    --cl-slate-100: #f1f5f9;
    --cl-slate-50:  #f8fafc;
    
    --cl-primary: #0284c7;
    --cl-primary-hover: #0369a1;
    
    --cl-radius-sm: 6px;
    --cl-radius-md: 10px;
    --cl-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

/* RESET PADDING DIVI */
#page-container {
    padding-top: 0px !important;
    margin-top: 0px !important;
}

.et_pb_header_placeholder {
    display: none !important;
    height: 0px !important;
    visibility: hidden !important;
}

/* MASQUAGE AUTOMATIQUE MENU NON-B2B */
body:not(.cs-user-b2b) .cs-b2b-only,
body:not(.cs-user-b2b) li a[href*="commande-rapide"],
body:not(.cs-user-b2b) li a[href*="schnellbestellung"],
body:not(.cs-user-b2b) li a[href*="quick-order"],
body:not(.cs-user-b2b) li a[href*="ordine-rapido"] {
    display: none !important;
}

/* 1. BADGE HEADER CLIENT & PRO */
a.cs-b2b-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    height: 34px !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

a.cs-b2b-badge.disconnect { 
    background: var(--cl-slate-900) !important; 
    color: #ffffff !important; 
}
a.cs-b2b-badge.disconnect:hover { 
    background: var(--cl-slate-800) !important; 
}

a.cs-b2b-badge.connected { 
    background: #e0f2fe !important; 
    color: #0369a1 !important; 
    border: 1px solid #7dd3fc !important; 
}
a.cs-b2b-badge.connected.pro { 
    background: #dcfce7 !important; 
    color: #15803d !important; 
    border: 1px solid #86efac !important; 
}
a.cs-b2b-badge.connected:hover { 
    opacity: 0.9; 
}

.cl-icon-sm { 
    font-size: 14px !important; 
    line-height: 1 !important; 
    display: inline-block !important; 
}

/* 2. INPUTS & BOUTONS GÉNÉRIQUES */
.cs-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--cl-radius-sm);
    border: 1px solid var(--cl-slate-200);
    font-size: 14px !important;
    font-weight: 500;
    color: var(--cl-slate-900);
    background-color: #ffffff;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.cs-input:focus {
    border-color: var(--cl-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.cl-btn-primary {
    height: 42px;
    padding: 0 24px;
    background: var(--cl-slate-900);
    color: #ffffff;
    border: none;
    border-radius: var(--cl-radius-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cl-btn-primary:hover { 
    background: var(--cl-primary); 
}
.cl-btn-primary:active { 
    transform: translateY(1px); 
}

.cl-btn-secondary {
    height: 42px;
    padding: 0 18px;
    background: #ffffff;
    color: var(--cl-slate-700);
    border: 1px solid var(--cl-slate-200);
    border-radius: var(--cl-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cl-btn-secondary:hover { 
    background: var(--cl-slate-100); 
    border-color: var(--cl-slate-600);
}

.cl-btn-lg {
    height: 48px;
    padding: 0 32px;
    font-size: 15px;
}

/* 3. COMMANDE RAPIDE B2B (HYBRIDE PRO/B2C) */
.cs-quick-order-fullwidth {
    width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff;
    border: 1px solid var(--cl-slate-200);
    border-radius: var(--cl-radius-md);
    padding: 24px 28px;
    box-shadow: var(--cl-shadow);
    margin: 20px 0;
}

.cs-quick-order-fullwidth.cs-access-denied {
    border-left: 4px solid var(--cl-primary);
}

.cs-quick-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--cl-slate-200);
    padding-bottom: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.cs-quick-header-bar h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--cl-slate-900);
}

.cs-quick-header-bar p {
    margin: 0;
    color: var(--cl-slate-500);
    font-size: 13px;
}

.cs-quick-actions-top {
    display: flex;
    gap: 10px;
}

.cs-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.cs-b2b-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cs-b2b-table th {
    background: var(--cl-slate-50);
    color: var(--cl-slate-600);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    border-bottom: 2px solid var(--cl-slate-200);
    text-align: left;
}

.cs-b2b-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--cl-slate-200);
    vertical-align: middle;
}

.cs-b2b-table tr.has-error {
    background-color: #fef2f2;
}

.row-num {
    font-weight: 600;
    color: var(--cl-slate-500);
    font-size: 13px;
}

.cs-product-preview {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.cs-prod-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-prod-thumb {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--cl-slate-200);
    background: #ffffff;
}

.cs-prod-title {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--cl-slate-900);
}

.cs-preview-placeholder { 
    color: var(--cl-slate-500); 
    font-size: 13px; 
    font-style: italic; 
}
.cs-loading { 
    color: var(--cl-primary); 
    font-size: 13px; 
    font-weight: 600; 
}
.cs-error { 
    color: #dc2626; 
    font-size: 13px; 
    font-weight: 600; 
}
.cs-price-tag { 
    font-weight: 700; 
    color: #15803d; 
    font-size: 14px; 
}

.cs-btn-remove {
    background: none;
    border: none;
    color: var(--cl-slate-500);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
}
.cs-btn-remove:hover { 
    color: #dc2626; 
}

.cs-quick-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.cs-submit-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

#cs-batch-msg { 
    font-size: 13.5px; 
    font-weight: 600; 
}
.cs-msg { 
    padding: 8px 12px; 
    border-radius: var(--cl-radius-sm); 
}
.cs-msg.success { 
    background: #f0fdf4; 
    color: #166534; 
    border: 1px solid #bbf7d0; 
}
.cs-msg.error { 
    background: #fef2f2; 
    color: #991b1b; 
    border: 1px solid #fecaca; 
}
.cs-msg.info { 
    color: var(--cl-slate-700); 
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .cs-quick-header-bar { flex-direction: column; align-items: flex-start; }
    .cs-quick-footer-bar { flex-direction: column; align-items: stretch; }
    .cs-submit-group { flex-direction: column; width: 100%; }
    .cl-btn-lg { width: 100%; }
}

@media (max-width: 575px) {
    .cs-quick-order-fullwidth { padding: 16px; margin: 12px 0; }
    .badge-text { font-size: 12px; }
}

.mob-standard-logo {
    width: 88px !important;
    height: 88px !important;
    object-fit: contain;
}
