/* simulateur.css */

.simulateur-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.simulateur-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 8px;
}

.simulateur-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
}

.simulateur-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    opacity: 0.9;
}

.simulateur-form {
    display: grid;
    gap: 25px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #2a5298;
}

.form-section h4 {
    margin: 0 0 15px 0;
    color: #1e3c72;
    font-size: 16px;
    font-weight: bold;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    min-width: 200px;
    font-weight: 500;
    color: #333;
}

.form-row input,
.form-row select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.params-section {
    display: block;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.btn-calculer,
.btn-reset,
.btn-imprimer,
.btn-exporter {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-calculer {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-calculer:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-reset {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    transform: translateY(-2px);
}

.btn-imprimer {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-imprimer:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
}

.btn-exporter {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-exporter:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
}

.resultats-section {
    margin-top: 30px;
    padding: 25px;
    background: #f1f3f4;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.resultats-section h4 {
    color: #1e3c72;
    margin: 0 0 20px 0;
    font-size: 18px;
    text-align: center;
}

.resultats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resultats-table th,
.resultats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.resultats-table th {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}

.resultats-table td {
    font-size: 14px;
}

.resultats-table tr:nth-child(even) {
    background: #f8f9fa;
}

.resultats-table tr:hover {
    background: #e3f2fd;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #2a5298;
}

.summary-item .label {
    font-weight: bold;
    color: #333;
}

.summary-item .value {
    color: #1e3c72;
    font-weight: bold;
}

.flux-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.flux-table th,
.flux-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.flux-table th {
    background: #2a5298;
    color: white;
    font-weight: bold;
}

.flux-table .montant {
    font-weight: bold;
    color: #28a745;
}

.actions-resultats {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading p {
    margin: 0;
    font-size: 16px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultats-section {
    animation: slideIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .simulateur-container {
        margin: 10px;
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-row label {
        min-width: auto;
        width: 100%;
    }
    
    .form-row input,
    .form-row select {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-resultats {
        flex-direction: column;
    }
    
    .resultats-table {
        font-size: 12px;
    }
    
    .resultats-table th,
    .resultats-table td {
        padding: 8px 6px;
    }
}

@media print {
    .form-section,
    .form-actions,
    .actions-resultats {
        display: none !important;
    }
    
    .simulateur-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .simulateur-header {
        background: #000 !important;
        color: #fff !important;
    }
}

/* États des champs */
.form-row input.error,
.form-row select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-row input.success,
.form-row select.success {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* Messages d'erreur */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.success-message {
    color: #28a745;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Indicateurs de devise */
.currency-indicator {
    position: relative;
}

.currency-indicator::after {
    content: "FCFA";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 12px;
    pointer-events: none;
}

.currency-indicator input {
    padding-right: 50px;
}

/* Amélioration des tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}