/* Container principal */
.simulateur-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Formulaires */
.simulateur-container label {
    font-weight: 600;
    display: block;
    margin: 1rem 0 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.simulateur-container input, 
.simulateur-container select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.simulateur-container input:focus, 
.simulateur-container select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    outline: none;
}

/* Boutons */
.simulateur-container button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to bottom, #0088cc, #0073aa);
    color: white;
    border: none;
    border-radius: 6px;
    margin: 1.5rem 0 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.simulateur-container button:hover {
    background: linear-gradient(to bottom, #0073aa, #005f8d);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.simulateur-container button:active {
    transform: translateY(0);
}

/* Validation */
.champ-obligatoire-manquant {
    border: 1px solid #e74c3c !important;
    background: #fff0f0;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-3px); }
    40%, 80% { transform: translateX(3px); }
}

/* Résultats */
.simulateur-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 0.95rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.simulateur-result-table th,
.simulateur-result-table td {
    border: 1px solid #e0e0e0;
    padding: 1rem;
    text-align: left;
}

.simulateur-result-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #2c3e50;
}

.simulateur-result-table tr:nth-child(even) {
    background-color: #fafcfd;
}

.simulateur-result-table .ligne-totale td {
    background-color: #e8f4fc;
    font-weight: 700;
    color: #0073aa;
    border-top: 2px solid #0073aa;
    border-bottom: 2px solid #0073aa;
}
/* Style principal du diagramme */
.calcul-flow-diagram {
    display: flex;
    flex-wrap: nowrap;
    align-items: center; 
    gap: 24px;
    overflow-x: auto;
    padding: 40px 4px;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}


.flow-box {
    border: 1.5px solid #ccc;        
    border-radius: 6px;
    padding: 12px 15px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    text-align: center;
    width: 100%;
    min-height: 110px;               
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flow-connector {
    width: 40px;
    height: 2px;
    background-image: linear-gradient(to right, #666 50%, transparent 0);
    background-size: 8px 2px;
    background-repeat: repeat-x;
    position: relative;
    flex-shrink: 0;
}
.flow-connector::after {
    content: "";
    position: absolute;
    right: -6px;
    top: -4px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #666;
}

.revenue-diff {
    border-color: #4a6da7;
    background-color: #f0f5ff;
}

.risk-box {
    border-color: #f7c600;
    background-color: #fffbe5;
}

.sacrifice-box {
    border-color: #eebebe;
    background-color: #fff4f0;
}

.base-prestation {
    border-color: #4aa76d;
    background-color: #f0fff4;
}

.coef-box {
    border-color: #ccc;
    background-color: #f9f9f9;
    padding: 8px 12px;
}

.final-prestation {
    border-color: #c44c6f;
    background-color: #fff0f5;
}

@media (max-width: 768px) {
    .calcul-flow-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .flow-connector {
        width: 2px;
        height: 40px;
        background-size: 2px 8px;
        background-image: linear-gradient(to bottom, #666 50%, transparent 0);
    }

    .flow-connector::after {
        right: auto;
        top: auto;
        bottom: -6px;
        left: -6px;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 6px solid #666;
    }
}


.flow-title {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.flow-subtitle {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-top: 4px;
    font-style: italic;
}

.flow-value {
    font-size: 16px;
    font-weight: bold;
    color: #2a5885;
    margin-top: 6px;
}

@media print {
  #telecharger-pdf { display: none !important; }
}
