body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 5px 0;
}

.container {
    max-width: 1200px;
}

.card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    /* padding: 20px; */
}

.card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table {
    margin-bottom: 0;
}

.table td, .table th {
    vertical-align: middle;
    padding: 0.5rem;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.form-control {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 4px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 1);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* Styles spécifiques pour les lignes du tableau */
.table-primary td {
    background-color: #b3d7ff !important;
    font-weight: bold;
}

.table-success td {
    background-color: #d1ecf1 !important;
    font-weight: bold;
}

.table-warning td {
    background-color: #fff3cd !important;
}

.table-info td {
    background-color: #d1ecf1 !important;
}

.table-light td {
    background-color: #f8f9fa !important;
}

.table-secondary td {
    background-color: #e2e3e5 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animation pour les résultats */
.card-body {
    transition: all 0.3s ease-in-out;
}

/* Style pour les champs numériques */
input[type="number"] {
    text-align: right;
}

/* Style pour les montants */
.text-end {
    font-family: 'Courier New', monospace;
}

/* Highlighting des résultats importants */
.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Style pour les paramètres */
.table-sm td {
    padding: 0.3rem;
    font-size: 0.875rem;
}

/* Titre principal */
h1 {
    color: white;
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

h1 i {
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Animations pour les sections */
.card-body {
    padding: 12px;
}

.mb-3 {
    position: relative;
}

/* Effet glassmorphism pour le tableau */
.table {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
}

.table td, .table th {
    border-color: rgba(255, 255, 255, 0.2);
    padding: 12px;
}

/* Amélioration des couleurs du tableau */
.table-primary td {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2)) !important;
    border-left: 4px solid #667eea;
    font-weight: 600;
}

.table-success td {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(25, 135, 84, 0.2)) !important;
    border-left: 4px solid #28a745;
    font-weight: 600;
}

.table-warning td {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 173, 0, 0.2)) !important;
    border-left: 4px solid #ffc107;
}

.table-info td {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.2), rgba(13, 202, 240, 0.2)) !important;
    border-left: 4px solid #17a2b8;
}

.table-light td {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(233, 236, 239, 0.8)) !important;
    border-left: 4px solid #6c757d;
}

.table-secondary td {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.2), rgba(73, 80, 87, 0.2)) !important;
    border-left: 4px solid #6c757d;
}

/* Champs en lecture seule */
.form-control[readonly] {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

.form-control[readonly]:focus {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
}

/* Animation de chargement */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive amélioré */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .card {
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    .card-header {
        padding: 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .card-body {
        padding: 20px 15px;
    }
}

/* Styles pour les cards de résultats */
.result-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

/* Styles spécifiques pour chaque card */
.result-card.bg-primary {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-left: 6px solid #007bff;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.result-card.bg-primary .result-icon {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-primary .result-value {
    color: #0056b3;
}

.result-card.bg-success {
    background: linear-gradient(145deg, #ffffff 0%, #f8fff8 100%);
    border-left: 6px solid #28a745;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.result-card.bg-success .result-icon {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-success .result-value {
    color: #1e7e34;
}

.result-card.bg-info {
    background: linear-gradient(145deg, #ffffff 0%, #f8feff 100%);
    border-left: 6px solid #17a2b8;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.15);
}

.result-card.bg-info .result-icon {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-info .result-value {
    color: #117a8b;
}

.result-card.bg-gradient {
    background: linear-gradient(145deg, #ffffff 0%, #f8f6ff 100%);
    border-left: 6px solid #6f42c1;
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.15);
}

.result-card.bg-gradient .result-icon {
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-gradient .result-value {
    color: #5a2d91;
}

.result-card.bg-warning {
    background: linear-gradient(145deg, #ffffff 0%, #fffef6 100%);
    border-left: 6px solid #f59e0b;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.result-card.bg-warning .result-icon {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-warning .result-value {
    color: #d97706;
}

.result-card.bg-success {
    background: linear-gradient(145deg, #ffffff 0%, #f6fff8 100%);
    border-left: 6px solid #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.result-card.bg-success .result-icon {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.result-card.bg-success .result-value {
    color: #047857;
}

.result-card::before {
    display: none;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.result-icon {
    font-size: 1.3rem;
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.result-value.highlight {
    font-size: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.result-detail {
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

/* Styles pour les détails */
.detail-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.detail-section h6 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: #4a5568;
    font-size: 0.85rem;
}

.detail-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.85rem;
}

/* Flux de salaire */
.salary-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.flow-step {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 110px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.flow-step.final {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid #667eea;
}

.flow-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    white-space: nowrap;
}

.flow-label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #667eea;
    flex: 0 0 auto;
}

.flow-arrow i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.flow-deduction {
    font-size: 0.7rem;
    color: #718096;
    text-align: center;
    max-width: 80px;
    display: block;
    margin-bottom: 3px;
}

.flow-amount-deduction {
    font-size: 0.65rem;
    font-weight: 600;
    color: #e53e3e;
    text-align: center;
    display: block;
    background: rgba(229, 62, 62, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

/* Icône d'information dans le flow */
.flow-label .fa-info-circle {
    color: #667eea;
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: help;
}

.flow-label .fa-info-circle:hover {
    opacity: 1;
    color: #4c51bf;
    transform: scale(1.1);
}

/* Style personnalisé pour les tooltips */
.tooltip .tooltip-inner {
    max-width: 250px;
    text-align: left;
    background-color: #2d3748;
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
}

.tooltip .tooltip-arrow::before {
    border-top-color: #2d3748;
}

/* Cards paramètres */
.param-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.param-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.param-label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

/* Accordion personnalisé */
.accordion-button {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    border: none;
    padding: 15px 20px;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    box-shadow: none;
}

.accordion-button:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.accordion-body {
    background: rgba(255, 255, 255, 0.95);
}

/* Sections de paramètres modernes */
.param-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    margin-bottom: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.param-section:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: white;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.section-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.section-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.section-info {
    flex: 1;
}

.section-title {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
}

.section-subtitle {
    color: #718096;
    margin: 0;
    font-style: italic;
    font-size: 0.75rem;
}

.section-content {
    padding: 0;
}

/* Input groups modernes */
.input-group-modern {
    display: flex;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.input-group-modern:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.input-group-modern:focus-within {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.input-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #667eea;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 5px;
}

.input-content {
    flex: 1;
    min-width: 0;
}

.input-content .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 2px;
}

.input-content .form-control {
    border: none;
    background: transparent;
    padding: 4px 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    transition: all 0.3s ease;
}

.input-content .form-control:focus {
    background: transparent;
    border-bottom-color: #667eea;
    box-shadow: none;
    transform: none;
}

.form-text {
    color: #718096;
    font-size: 0.75rem;
    margin-top: 4px;
    font-style: italic;
}

/* Styles pour le graphique de répartition */
.chart-container-enhanced {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.chart-title h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
}

.chart-wrapper {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-legend-enhanced {
    padding: 25px 20px;
    height: 100%;
}

.chart-legend-simple {
    padding: 15px;
    height: 100%;
}

.legend-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.legend-title-simple {
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1em;
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.legend-indicator {
    position: relative;
    margin-right: 16px;
    flex-shrink: 0;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.legend-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.legend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.legend-label {
    font-weight: 600;
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.legend-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-value {
    font-weight: 700;
    color: #10b981;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.legend-percentage {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-item-simple {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.legend-item-simple:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.legend-name {
    font-weight: 500;
    font-size: 0.9em;
    line-height: 1.2;
}

.legend-amount {
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.1;
}

.legend-percent {
    font-size: 0.8em;
    font-style: italic;
    line-height: 1;
    opacity: 0.8;
}

/* Responsive pour le graphique */
@media (max-width: 768px) {
    .chart-container-enhanced {
        margin-bottom: 20px;
    }
    
    .chart-wrapper {
        height: 280px;
    }
    
    .legend-item, .legend-item-simple {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .legend-values {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation d'apparition des sections */
.param-section {
    animation: slideInUp 0.6s ease-out;
}

.param-section:nth-child(1) { animation-delay: 0.1s; }
.param-section:nth-child(2) { animation-delay: 0.2s; }
.param-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .salary-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .result-card {
        margin-bottom: 15px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .input-group-modern {
        flex-direction: column;
        text-align: center;
    }
    
    .input-icon {
        margin: 0 auto 10px auto;
    }
    
    .param-section {
        padding: 15px;
        margin-bottom: 20px;
    }
}

/* Styles pour la section réserve légale */
.reserve-amount-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.reserve-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.reserve-label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.reserve-explanation {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.reserve-explanation h6 {
    color: #667eea;
    font-size: 0.95rem;
}

.reserve-explanation p {
    line-height: 1.4;
    font-size: 0.9rem;
}

.reserve-explanation ul {
    font-size: 0.85rem;
    line-height: 1.3;
}

.reserve-explanation li {
    margin-bottom: 2px;
}

/* === STYLES MODERNES POUR LA RÉPARTITION DU CA === */

/* Section graphique */
.chart-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.chart-canvas-container {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .legend-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards individuelles pour chaque composant */
.legend-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.legend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.1);
}

.legend-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.legend-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Couleurs spécifiques pour chaque type */
.legend-card.salaire-net .legend-card-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.legend-card.frais-gestion .legend-card-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.legend-card.frais-pro .legend-card-icon { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.legend-card.reserve-legale .legend-card-icon { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.legend-card.charges-sociales .legend-card-icon { background: linear-gradient(135deg, #e11d48 0%, #be185d 100%); }

.legend-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    line-height: 1.3;
}

.legend-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.legend-card-amount {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.legend-card-percent {
    font-weight: 700;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.06);
    color: #4b5563;
    min-width: 60px;
    text-align: center;
}

/* Barres de progression */
.legend-card-progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.salaire-net-bar { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.frais-gestion-bar { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.frais-pro-bar { background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); }
.reserve-legale-bar { background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%); }
.charges-sociales-bar { background: linear-gradient(90deg, #e11d48 0%, #be185d 100%); }

/* Animation d'entrée */
.legend-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend-card:nth-child(1) { animation-delay: 0.1s; }
.legend-card:nth-child(2) { animation-delay: 0.2s; }
.legend-card:nth-child(3) { animation-delay: 0.3s; }
.legend-card:nth-child(4) { animation-delay: 0.4s; }
.legend-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}