/* Simulateur Portage - Styles CSS */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

#simulateur-portage-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Roboto', Helvetica, Arial, Lucida, sans-serif;
    line-height: 1.6;
    color: white;
    background-color: #131B31;
    padding: 30px;
    border-radius: 12px;
    font-style: italic;
}

/* Header */
.simulateur-header {
    text-align: center;
    margin-bottom: 30px;
}

.simulateur-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 700;
    font-style: italic;
}

.text-rose {
    color: #D52A86;
}

.simulateur-description {
    color: #e0e0e0;
    font-size: 1.1rem;
}

/* Formulaire */
.simulateur-form {
    background: #0E142D;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Navigation des onglets */
.simulateur-tabs {
    margin-bottom: 30px;
}

.tabs-label {
    margin-bottom: 15px;
    font-weight: 600;
    color: white;
}

.tabs-navigation {
    display: flex;
    border: 1px solid #2a3441;
    border-radius: 6px;
    overflow: hidden;
    background: #1a2238;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border-right: 1px solid #2a3441;
    color: #e0e0e0;
    font-family: 'Roboto', Helvetica, Arial, Lucida, sans-serif;
    font-style: italic;
    font-weight: 600;
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: #293447;
    color: white;
}

.tab-button.active {
    background: #D52A86;
    color: white;
}

/* Contenu des onglets */
.tab-content {
    display: none;
    margin-bottom: 20px;
}

.tab-content.active {
    display: block;
}

/* Champs de formulaire */
.form-row {
    margin-bottom: 20px;
}

.form-row-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: end; /* Aligne les champs en bas (sur la même ligne) */
}

.form-row.half {
    flex: 1;
}

.form-row.half label {
    min-height: 50px; /* Hauteur minimum pour uniformiser */
    display: flex;
    align-items: flex-end; /* Aligne le texte du label en bas */
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: white;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #2a3441;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #1a2238;
    color: white;
}

.form-row input:disabled {
    background-color: #111827;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.input-group input {
    padding-right: 50px;
}

.input-suffix {
    position: absolute;
    right: 15px;
    color: #e0e0e0;
    font-weight: 500;
    pointer-events: none;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #D52A86;
    box-shadow: 0 0 0 2px rgba(213, 42, 134, 0.2);
}

/* Champs communs */
.common-fields {
    border-top: 1px solid #2a3441;
    padding-top: 20px;
    margin-top: 20px;
}

/* Actions du formulaire */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-calculer {
    background: #D52A86;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
    font-family: 'Roboto', Helvetica, Arial, Lucida, sans-serif;
    font-style: italic;
}

.btn-calculer:hover {
    background: #b8236f;
}

.btn-calculer:disabled {
    background: #5a3651;
    cursor: not-allowed;
}

.disclaimer {
    margin-top: 15px;
    font-size: 14px;
    color: #e0e0e0;
    font-style: italic;
}

/* Section des résultats */
.resultats-section {
    margin-top: 40px;
    background: #0E142D;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.resultats-section h3 {
    margin-bottom: 25px;
    color: white;
    font-size: 1.5rem;
}

.resultats-tableau {
    background: #1a2238;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.resultat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a3441;
}

.resultat-row:last-child {
    border-bottom: none;
}

.resultat-row.highlight {
    background: #2a4533;
    margin: 10px -20px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 6px 6px;
    font-weight: 600;
}

.resultat-label {
    font-weight: 500;
    color: white;
}

.resultat-value {
    font-weight: 600;
    color: #4CAF50;
    font-size: 1.1rem;
}

/* Actions des résultats */
.resultats-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-export,
.btn-contact {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 250px;
    font-family: 'Roboto', Helvetica, Arial, Lucida, sans-serif;
    font-style: italic;
}

.btn-export {
    background: #D52A86;
    color: white;
}

.btn-export:hover {
    background: #b8236f;
}

.btn-contact {
    background: #D52A86;
    color: white;
}

.btn-contact:hover {
    background: #b8236f;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    background: rgba(14, 20, 45, 0.95);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #2a3441;
    border-top: 4px solid #D52A86;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Validation et styles d'erreur */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Style d'erreur seulement pour les champs touchés et vides */
.form-row input.field-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-row input.field-error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.3);
}

/* Suppression des styles de validation verte */

/* Responsive */
@media (max-width: 768px) {
    #simulateur-portage-container {
        margin: 0 15px;
    }
    
    .simulateur-form {
        padding: 20px;
    }
    
    .tabs-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 1 50%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .form-row-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .resultats-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tab-button {
        flex: 1 1 100%;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .simulateur-header h2 {
        font-size: 1.5rem;
    }
}