/* =================================================
   CRM  NOUVELLE GENERATION SECTION
   ================================================= */

   /* Section CRM */
.crm-section {
    background: #f8f9fa;
    padding: 60px 0 40px 0;
}
.crm-header {
    text-align: center;
    margin-bottom: 32px;
}
.crm-title {
    font-size: 2.2rem;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -1px;
}
.crm-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 0;
}
.crm-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
}
.crm-info {
    flex: 1 1 320px;
    min-width: 280px;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(102,126,234,0.07);
    padding: 32px 28px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}
.crm-info:hover {
    box-shadow: 0 8px 32px rgba(102,126,234,0.13);
}
.crm-main-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.crm-features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}
.crm-features-list li {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5ff;
    border-radius: 8px;
    padding: 8px 12px;
    transition: background 0.2s;
}
.crm-features-list li i {
    color: #667eea;
    font-size: 1.1em;
}
.crm-features-list li:hover {
    background: #e0e7ff;
}
.btn-crm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    border: none;
}
.btn-crm:hover {
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 16px rgba(102,126,234,0.15);
}
.crm-schema {
    flex: 1 1 340px;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(102,126,234,0.07);
    padding: 32px 18px 18px 18px;
    margin-bottom: 24px;
}
.crm-svg-schema {
    margin-bottom: 16px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.crm-schema-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    color: #6c757d;
    font-size: 0.98rem;
    flex-wrap: wrap;
}
.crm-schema-legend i {
    margin-right: 4px;
    color: #667eea;
}

/* Responsive */
@media (max-width: 1100px) {
    .crm-content {
        gap: 24px;
    }
    .crm-info, .crm-schema {
        padding: 24px 10px;
    }
}
@media (max-width: 900px) {
    .crm-content {
        flex-direction: column;
        gap: 32px;
    }
    .crm-schema, .crm-info {
        max-width: 100%;
    }
}
@media (max-width: 600px) {
    .crm-section {
        padding: 32px 0 20px 0;
    }
    .crm-info, .crm-schema {
        padding: 16px 4px;
        border-radius: 10px;
    }
    .crm-title {
        font-size: 1.3rem;
    }
    .crm-main-title {
        font-size: 1.1rem;
    }
}

/* Dashboard CRM widgets */
.crm-dashboard {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}
.dashboard-row {
    display: flex;
    gap: 18px;
    justify-content: center;
}
.dashboard-widget {
    background: #f4f7ff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    min-width: 160px;
    transition: box-shadow 0.2s;
}
.dashboard-widget:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.13);
}
.widget-icon {
    font-size: 1.5rem;
    color: #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bg-success { background: #22c55e; }
.bg-warning { background: #f59e0b; }
.bg-primary { background: #667eea; }
.bg-danger { background: #ef4444; }
.widget-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.widget-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}
.widget-label {
    font-size: 0.95rem;
    color: #6c757d;
}

/* Mini chart */
.dashboard-chart {
    margin-top: 18px;
    background: #e0e7ff;
    border-radius: 10px;
    padding: 14px 18px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
}
.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chart-bar-bg {
    background: #fff;
    border-radius: 6px;
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    overflow: hidden;
}
.chart-bar {
    background: linear-gradient(90deg, #22c55e 60%, #667eea 100%);
    height: 100%;
    border-radius: 6px 0 0 6px;
    transition: width 1s cubic-bezier(.4,2,.6,1);
}
.chart-legend {
    font-size: 0.92rem;
    color: #6c757d;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}
.legend-dot.bg-success { background: #22c55e; }
.legend-dot.bg-primary { background: #667eea; }



/* Responsive dashboard */
@media (max-width: 600px) {
    .dashboard-row {
        flex-direction: column;
        gap: 10px;
    }
    .dashboard-widget {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }
    .dashboard-chart {
        width: 100%;
        max-width: 100%;
    }
    .chart-bar-bg {
        height: 10px;
    }
    .chart-bar {
        font-size: 0.85rem;
        height: 10px;
    }
    .chart-bar::after {
        font-size: 0.85rem;
        right: 4px;
        top: 0;
        line-height: 10px;
    }
}

/* ============================
   CRM DASHBOARD AVANCÉ
   ============================ */

/* Animation d’apparition des widgets */
.dashboard-widget {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: widgetFadeIn 0.7s cubic-bezier(.4,2,.6,1) forwards;
}
.dashboard-row .dashboard-widget:nth-child(1) { animation-delay: 0.1s; }
.dashboard-row .dashboard-widget:nth-child(2) { animation-delay: 0.25s; }
.dashboard-row .dashboard-widget:nth-child(3) { animation-delay: 0.4s; }
.dashboard-row .dashboard-widget:nth-child(4) { animation-delay: 0.55s; }

@keyframes widgetFadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Badge de statut sur widget */
.widget-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #22c55e;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}
.dashboard-widget[data-status="up"] .widget-status { background: #22c55e; }
.dashboard-widget[data-status="down"] .widget-status { background: #ef4444; }
.dashboard-widget[data-status="warn"] .widget-status { background: #f59e0b; }

/* Mini-cards pour notifications */
.crm-mini-cards {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    justify-content: center;
    flex-wrap: wrap;
}
.crm-mini-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    color: #667eea;
    font-weight: 600;
    transition: box-shadow 0.2s, background 0.2s;
}
.crm-mini-card i {
    font-size: 1.1rem;
}
.crm-mini-card:hover {
    background: #e0e7ff;
    box-shadow: 0 4px 16px rgba(102,126,234,0.13);
}

/* Notification style */
.crm-notification {
    background: linear-gradient(90deg, #22c55e 0%, #667eea 100%);
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 500;
    margin: 18px auto 0 auto;
    max-width: 340px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: notifFadeIn 0.8s cubic-bezier(.4,2,.6,1);
}
@keyframes notifFadeIn {
    from { opacity: 0; transform: translateY(-20px);}
    to { opacity: 1; transform: translateY(0);}
}

/* Amélioration chart */
.chart-bar {
    position: relative;
}
.chart-bar::after {
    content: attr(data-value) "%";
    position: absolute;
    right: 8px;
    top: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 14px;
    opacity: 0.8;
}

/* Responsive mini-cards et notif */
@media (max-width: 600px) {
    .crm-mini-cards {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .crm-notification {
        font-size: 0.95rem;
        padding: 8px 10px;
    }
}
















    :root{
      --accent:#2563eb;
      --muted:#6b7280;
      --card:#ffffff;
      --bg:#f7fbff;
      --container:1200px;
    }
    .erp-page{padding-top:50px}
    .erp-hero{
      background:linear-gradient(180deg, rgba(37,99,235,0.06), transparent 60%);
      padding:48px 16px;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .erp-wrap{max-width:var(--container);width:100%;margin:0 auto;display:grid;grid-template-columns:1fr 460px;gap:32px;align-items:center}
    .erp-hero .kicker{display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(37,99,235,0.12);color:var(--accent);font-weight:700;font-size:13px;margin-bottom:12px}
    h1#erp-title{font-size:28px;margin:0 0 12px;color:#0b1220}
    .lead{color:var(--muted);font-size:16px;line-height:1.5;margin-bottom:18px}
    .cta-row{display:flex;gap:12px;flex-wrap:wrap}
    .btn{padding:10px 14px;border-radius:10px;border:1px solid transparent;cursor:pointer;font-weight:700}
    .btn-primary{background:var(--accent);color:#fff}
    .btn-ghost{background:#fff;border:1px solid #e6eefc;color:var(--accent)}
    .hero-meta{margin-top:14px;color:var(--muted);font-size:13px}

    /* SVG card */
    .svg-card{background:var(--card);padding:20px;border-radius:12px;box-shadow:0 8px 30px rgba(2,6,23,0.06);display:flex;align-items:center;justify-content:center}
    .svg-anim{width:100%;max-width:380px;height:260px}

    /* features */
    .features{max-width:var(--container);margin:34px auto;padding:0 16px;display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
    .feature{background:var(--card);padding:18px;border-radius:12px;box-shadow:0 6px 18px rgba(2,6,23,0.04)}
    .feature h3{margin:0 0 8px;font-size:16px}
    .feature p{margin:0;color:var(--muted);font-size:14px;line-height:1.45}

    .benefits{max-width:var(--container);margin:34px auto;padding:24px 16px;border-radius:12px;background:linear-gradient(90deg, rgba(37,99,235,0.03), rgba(99,102,241,0.02));display:flex;gap:18px;align-items:center}
    .benefits .cols{display:flex;gap:18px;flex:1}
    .stat{background:#fff;padding:14px;border-radius:10px;box-shadow:0 6px 18px rgba(2,6,23,0.04);text-align:center;min-width:120px}
    .stat .num{font-size:20px;font-weight:800;color:var(--accent)}
    .stat .lbl{color:var(--muted);font-size:13px}

    footer.erp-cta{max-width:var(--container);margin:36px auto;padding:20px 16px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:space-between;box-shadow:0 10px 30px rgba(2,6,23,0.04)}
    @media (max-width:980px){
      .erp-wrap{grid-template-columns:1fr}
      .features{grid-template-columns:1fr}
      .benefits{flex-direction:column;align-items:stretch}
      footer.erp-cta{flex-direction:column;gap:12px;align-items:flex-start}
    }

    /* simple SVG animation (gears + boxes) */
    .gear{transform-origin:50% 50%;animation:spin 6s linear infinite}
    @keyframes spin{from{transform:rotate(0deg)} to{transform:rotate(360deg)}}

    /* accessible focus */
    .btn:focus{outline:3px solid rgba(37,99,235,0.15);outline-offset:2px}

    /* animate bars smoothly */
    .chart-bar{height:10px;border-radius:999px;background:linear-gradient(90deg,#22c55e,#2563eb);width:0%;transition:width .9s ease}

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce){
      .gear{animation:none !important}
      .chart-bar{transition:none}
      .crm-svg-schema .crm-branches{display:none}
    }