/**
 * Styles pour le formulaire d'estimation Mon-Économiste
 * Couleurs : Orange #F89711, Bleu/Vert #004953, Gris clair #F8F9FA
 */

/* Container principal */
.me-estimation-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* En-tête avec logo */
.me-estimation-header {
    text-align: center;
    margin-bottom: 40px;
}

.me-estimation-header img {
    max-width: 200px;
    margin-bottom: 20px;
}

.me-estimation-header h2 {
    color: #004953;
    font-size: 28px;
    margin-bottom: 10px;
}

.me-estimation-header p {
    color: #666;
    font-size: 16px;
}

/* Indicateur d'étapes */
.me-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.me-steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.me-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.me-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.me-step.active .me-step-circle {
    background: #F89711;
    color: white;
}

.me-step.completed .me-step-circle {
    background: #004953;
    color: white;
}

.me-step-label {
    font-size: 14px;
    color: #666;
}

.me-step.active .me-step-label {
    color: #F89711;
    font-weight: bold;
}

/* Formulaire */
.me-form-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.me-form-section.hidden {
    display: none;
}

.me-form-group {
    margin-bottom: 25px;
}

.me-form-group label {
    display: block;
    font-weight: 600;
    color: #004953;
    margin-bottom: 10px;
    font-size: 16px;
}

.me-form-group .required {
    color: #F89711;
}

/* Boutons de type de bien (avec icônes) */
.me-bien-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.me-bien-option {
    position: relative;
}

.me-bien-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.me-bien-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    background: white;
}

.me-bien-option label:hover {
    border-color: #F89711;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 151, 17, 0.2);
}

.me-bien-option input[type="radio"]:checked + label {
    border-color: #F89711;
    background: #FFF3E0;
}

.me-bien-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.me-bien-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Champs de formulaire standards */
.me-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.me-form-control:focus {
    outline: none;
    border-color: #F89711;
}

/* Slider de surface */
.me-surface-container {
    margin-top: 15px;
}

.me-surface-display {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #F89711;
    margin-bottom: 15px;
}

.me-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.me-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F89711;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.me-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F89711;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Boutons radio budget */
.me-budget-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.me-budget-option {
    position: relative;
}

.me-budget-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.me-budget-option label {
    display: block;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.me-budget-option label:hover {
    border-color: #F89711;
}

.me-budget-option input[type="radio"]:checked + label {
    border-color: #F89711;
    background: #FFF3E0;
    font-weight: bold;
}

/* Résultat de l'estimation */
.me-result-box {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFEDD5 100%);
    border-left: 5px solid #F89711;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.me-result-box h3 {
    color: #004953;
    font-size: 24px;
    margin-bottom: 15px;
}

.me-result-amount {
    font-size: 36px;
    font-weight: bold;
    color: #F89711;
    margin: 20px 0;
}

.me-result-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.me-confidence-bar {
    margin: 20px 0;
}

.me-confidence-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.me-confidence-icons {
    font-size: 24px;
}

/* Tableau détaillé */
.me-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.me-details-table thead {
    background: #004953;
    color: white;
}

.me-details-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.me-details-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.me-details-table tbody tr:nth-child(even) {
    background: #F8F9FA;
}

.me-details-table tbody tr:hover {
    background: #FFF3E0;
}

.me-details-table tfoot {
    background: #FFF3E0;
    font-weight: bold;
    font-size: 18px;
}

.me-details-table tfoot td {
    padding: 15px;
    border-top: 3px solid #F89711;
}

.me-amount {
    text-align: right;
    color: #004953;
    font-weight: 600;
}

/* Cases à cocher RGPD */
.me-checkbox-group {
    margin: 15px 0;
}

.me-checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    cursor: pointer;
}

.me-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.me-checkbox-group a {
    color: #F89711;
    text-decoration: none;
}

.me-checkbox-group a:hover {
    text-decoration: underline;
}

/* Boutons */
.me-btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.me-btn-primary {
    background: #F89711;
    color: white;
}

.me-btn-primary:hover {
    background: #e08600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 151, 17, 0.4);
}

.me-btn-secondary {
    background: #004953;
    color: white;
    margin-left: 10px;
}

.me-btn-secondary:hover {
    background: #003540;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 73, 83, 0.4);
}

.me-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.me-btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Actions rapides */
.me-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Loading spinner */
.me-loading {
    text-align: center;
    padding: 40px;
}

.me-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F89711;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'erreur */
.me-error {
    background: #fee;
    border-left: 4px solid #f00;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    color: #c00;
}

/* Contenu éditorial */
.me-content-section {
    margin: 60px 0;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.me-content-section h3 {
    color: #004953;
    font-size: 26px;
    margin-bottom: 20px;
    border-bottom: 3px solid #F89711;
    padding-bottom: 10px;
}

.me-content-section h4 {
    color: #004953;
    font-size: 20px;
    margin: 25px 0 15px 0;
}

.me-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.me-feature-item {
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
    border-left: 4px solid #F89711;
}

.me-feature-item h5 {
    color: #004953;
    font-size: 18px;
    margin-bottom: 10px;
}

/* FAQ Accordéon */
.me-faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.me-faq-question {
    background: #F8F9FA;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #004953;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.me-faq-question:hover {
    background: #FFF3E0;
}

.me-faq-question::after {
    content: '+';
    font-size: 24px;
    color: #F89711;
}

.me-faq-item.active .me-faq-question::after {
    content: '−';
}

.me-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.me-faq-item.active .me-faq-answer {
    padding: 15px 20px;
    max-height: 500px;
}

/* CTA final */
.me-final-cta {
    background: linear-gradient(135deg, #004953 0%, #006673 100%);
    color: white;
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    margin: 60px 0;
}

.me-final-cta h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.me-final-cta p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Liens légaux */
.me-legal-links {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}

.me-legal-links a {
    color: #F89711;
    text-decoration: none;
    margin: 0 10px;
}

.me-legal-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .me-estimation-container {
        padding: 0 15px;
    }

    .me-form-section {
        padding: 25px;
    }

    .me-result-amount {
        font-size: 28px;
    }

    .me-btn {
        padding: 12px 30px;
        font-size: 16px;
    }

    .me-bien-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .me-details-table {
        font-size: 14px;
    }

    .me-details-table th,
    .me-details-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .me-bien-options {
        grid-template-columns: 1fr;
    }

    .me-budget-options {
        grid-template-columns: 1fr;
    }

    .me-action-buttons {
        flex-direction: column;
    }

    .me-btn {
        width: 100%;
    }
}
