:root {
    --primary-color: #03aebc;
    --secondary-color: #1E40AF;
    --accent-color: #03aebc;
    --dark-color: #1E3A8A;
    --light-color: #F8FAFC;
    --gray-color: #E2E8F0;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --border-color: #CBD5E0;
    --text-color: #1F2937;
    --text-light: #6B7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F8F9FA;
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.logo i {
    font-size: 20px;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    background-color: white;
    transition: all 0.2s;
}

.btn i {
    font-size: 14px;
}

.run-btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.run-btn:hover {
    background-color: var(--secondary-color);
}

.save-btn:hover {
    background-color: var(--gray-color);
}

.workflow-container {
    margin-top: 80px;
    padding: 30px;
}

.scenario-info {
    text-align: center;
    margin-bottom: 40px;
}

.scenario-info h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.scenario-info p {
    color: var(--text-light);
    font-size: 16px;
}

.workflow-area {
    position: relative;
    width: 100%;
    min-height: 400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    padding: 40px;
}

.modules-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 50px;
    min-height: 300px;
    justify-items: center;
}

.module {
    position: relative;
    width: 220px;
    height: 160px;
    background-color: white;
    border-radius: 12px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.module:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.module-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.module-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}

.module-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.module-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.connection-path {
    stroke: var(--primary-color);
    stroke-width: 2;
    fill: none;
    marker-end: url(#arrowhead);
}

.connection-path.highlight {
    stroke: var(--secondary-color);
    stroke-width: 3;
}

/* Couleurs spécifiques pour chaque module */
.module.scraping { border-top-color: #03aebc; }
.module.scraping .module-icon { background-color: #03aebc; }

.module.enrichment { border-top-color: #6366F1; }
.module.enrichment .module-icon { background-color: #6366F1; }

.module.validation { border-top-color: #8B5CF6; }
.module.validation .module-icon { background-color: #8B5CF6; }

.module.segmentation { border-top-color: #A855F7; }
.module.segmentation .module-icon { background-color: #A855F7; }

.module.emailing { border-top-color: #D946EF; }
.module.emailing .module-icon { background-color: #D946EF; }

.module.engagement { border-top-color: #EC4899; }
.module.engagement .module-icon { background-color: #EC4899; }

.module.scoring { border-top-color: #F43F5E; }
.module.scoring .module-icon { background-color: #F43F5E; }

.module.dashboard { border-top-color: #F97316; }
.module.dashboard .module-icon { background-color: #F97316; }

/* Panneau latéral */
.side-panel {
    position: fixed;
    top: 60px;
    right: 0;
    width: 350px;
    height: calc(100vh - 60px);
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 90;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    transform: translateX(0);
}

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

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
}

.panel-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.module-header-panel {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.module-icon-panel {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: white;
}

.module-title-panel {
    font-size: 20px;
    font-weight: 600;
}

.module-details {
    margin-top: 20px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h5 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.features-list, .apis-list {
    list-style-type: none;
}

.features-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color); /* Texte en noir */
}

.features-list li:before {
    content: "\2022";
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 18px;
    color: inherit; /* La couleur sera définie dynamiquement */
}

.apis-list li {
    display: flex;
    flex-direction: column;
    padding: 8px 0 8px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.apis-list li:last-child {
    border-bottom: none;
}

.apis-list li strong {
    font-weight: 500;
}

.apis-list li span {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 3px;
}

.module-desc-panel {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

.module-settings-btn {
    margin-top: 15px;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}

.module-settings-btn:hover {
    background-color: var(--gray-color);
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .workflow-area {
        padding: 30px;
    }
    
    .modules-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .workflow-area {
        padding: 20px;
    }
    
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .side-panel {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        width: 280px;
    }
    
    .module-settings-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}