/* ==============================================
   FLUENT FORMS - ESTIMATION IMMOBILIÈRE
   Design épuré style Wehome
   Pour .fluent_form_3
   
   CLASSES À AJOUTER DANS FLUENT FORMS :
   ┌────────────────────┬──────────────────────────────────────┐
   │ Classe CSS         │ Utilisation                          │
   ├────────────────────┼──────────────────────────────────────┤
   │ ff-image-cards     │ Radios avec images (type de bien)    │
   │ ff-radio-cards     │ Radios en cartes (sous-types)        │
   │ ff-stepper         │ Champs numériques avec +/-           │
   │ ff-checkbox-pills  │ Checkboxes en pills (aménagements)   │
   └────────────────────┴──────────────────────────────────────┘
   ============================================== */

/* ==============================================
   ANTI-FOUC : Cacher le formulaire jusqu'au chargement
   ============================================== */

.fluent_form_3 {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fluent_form_3.ff-loaded {
    opacity: 1;
}

/* ==============================================
   VARIABLES DE COULEURS
   ============================================== */

.fluent_form_3 {
    --primary-color: #1a5f4a;
    --primary-hover: #15503e;
    --button-color: #6b9080;
    --button-hover: #5a7d6d;
    --border-color: #e0e0e0;
    --border-selected: #1a5f4a;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-selected: #f0f0f0;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ==============================================
   BASE & CONTENEUR
   ============================================== */

.fluent_form_3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Titres de section */
.fluent_form_3 .ff-el-section-break .ff-el-section-title,
.fluent_form_3 h3,
.fluent_form_3 .ff-step-title {
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ==============================================
   LABELS & TOOLTIPS (Global)
   ============================================== */

.fluent_form_3 .ff-el-input--label {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

.fluent_form_3 .ff-el-input--label label {
    display: inline !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix pour les labels dans les colonnes */
.fluent_form_3 .ff-t-container .ff-el-input--label {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fluent_form_3 .ff-t-container .ff-el-input--label label {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Tooltip */
.fluent_form_3 .ff-el-tooltip {
    display: inline-flex !important;
    align-items: center;
    cursor: help;
    margin-left: 4px;
    position: relative;
}

.fluent_form_3 .ff-el-tooltip svg {
    fill: var(--text-muted);
    transition: fill 0.2s;
}

.fluent_form_3 .ff-el-tooltip:hover svg {
    fill: var(--primary-color);
}

/* ==============================================
   1. .ff-image-cards — RADIOS AVEC IMAGES
      (Type de bien : Maison, Appartement, etc.)
   ============================================== */

.fluent_form_3 .ff-image-cards .ff_el_checkable_photo_holders {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 1rem;
}

.fluent_form_3 .ff-image-cards .ff-el-image-holder {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white) !important;
    min-height: 120px;
    margin: 0 !important;
}

.fluent_form_3 .ff-image-cards .ff-el-image-holder:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(26, 95, 74, 0.15);
}

.fluent_form_3 .ff-image-cards .ff-el-image-holder.ff_item_selected {
    border-color: var(--primary-color) !important;
    background: var(--bg-selected) !important;
}

.fluent_form_3 .ff-image-cards .ff-el-image-input-src {
    display: block;
    width: 28px;
    height: 28px;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin-bottom: 1rem;
    cursor: pointer;
}

.fluent_form_3 .ff-image-cards .ff-el-form-check-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.fluent_form_3 .ff-image-cards input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}

.fluent_form_3 .ff-image-cards .ff-el-form-check-label span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark) !important;
    text-align: center;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Override ff_list_buttons */
.fluent_form_3 .ff-image-cards.ff_list_buttons .ff-el-form-check-label,
.fluent_form_3.ff_list_buttons .ff-image-cards .ff-el-form-check-label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.fluent_form_3 .ff-image-cards.ff_list_buttons .ff-el-form-check-label span,
.fluent_form_3.ff_list_buttons .ff-image-cards .ff-el-form-check-label span {
    background: transparent !important;
    color: var(--text-dark) !important;
    padding: 0 !important;
}

/* ==============================================
   2. .ff-radio-cards — RADIOS EN CARTES VERTICALES
      (Sous-types : Maison individuelle, jumelée, etc.)
   ============================================== */

.fluent_form_3 .ff-radio-cards .ff-el-input--content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check {
    display: block !important;
    margin: 0 !important;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check-label {
    display: block !important;
    padding: 12px 20px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white) !important;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check-label:hover {
    border-color: var(--primary-color) !important;
    background: var(--bg-light) !important;
}

.fluent_form_3 .ff-radio-cards input[type="radio"],
.fluent_form_3 .ff-radio-cards .ff-el-form-check-radio {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check:has(input:checked) .ff-el-form-check-label {
    background: var(--bg-selected) !important;
    border-color: var(--border-color) !important;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check-label span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

/* Titre + description (séparés par |) */
.fluent_form_3 .ff-radio-cards .ff-el-form-check-label span strong {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0;
}

.fluent_form_3 .ff-radio-cards .ff-el-form-check-label span small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* ==============================================
   3. .ff-stepper — CHAMPS NUMÉRIQUES AVEC +/-
      (Nombre de pièces, salles de bains, etc.)
   ============================================== */

.fluent_form_3 .ff-stepper .ff-number-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-white);
}

.fluent_form_3 .ff-stepper .ff-number-wrapper input[type="number"] {
    border: none !important;
    border-radius: 0 !important;
    text-align: center;
    flex: 1;
    padding: 12px 8px !important;
    font-size: 1rem;
    font-weight: 500;
    -moz-appearance: textfield;
    min-width: 60px;
}

.fluent_form_3 .ff-stepper .ff-number-wrapper input[type="number"]::-webkit-outer-spin-button,
.fluent_form_3 .ff-stepper .ff-number-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fluent_form_3 .ff-stepper .ff-number-wrapper input[type="number"]:focus {
    box-shadow: none !important;
}

.fluent_form_3 .ff-stepper .ff-number-wrapper:focus-within {
    border-color: #01473D;
}

.fluent_form_3 .ff-stepper .ff-number-wrapper:focus-within .ff-number-btn {
    color: #01473D;
}

.fluent_form_3 .ff-stepper .ff-number-btn {
    width: 46px;
    border: none;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 1.3rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fluent_form_3 .ff-stepper .ff-number-btn:hover {
    background: #e8e8e8;
    color: var(--primary-color);
}

.fluent_form_3 .ff-stepper .ff-number-btn:active {
    background: #ddd;
}

.fluent_form_3 .ff-stepper .ff-number-minus {
    border-right: 1px solid var(--border-color);
}

.fluent_form_3 .ff-stepper .ff-number-plus {
    border-left: 1px solid var(--border-color);
}

/* ==============================================
   4. .ff-checkbox-pills — CHECKBOXES EN PILLS
      (Aménagements : Sauna, Piscine, Jacuzzi)
   ============================================== */

.fluent_form_3 .ff-checkbox-pills .ff-el-input--content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fluent_form_3 .ff-checkbox-pills .ff-el-form-check {
    display: inline-block !important;
    margin: 0 !important;
}

.fluent_form_3 .ff-checkbox-pills .ff-el-form-check-checkbox {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.fluent_form_3 .ff-checkbox-pills .ff-el-form-check-label {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.fluent_form_3 .ff-checkbox-pills .ff-el-form-check-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.fluent_form_3 .ff-checkbox-pills .ff-el-form-check:has(input:checked) .ff-el-form-check-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Labels pour .ff-checkbox-pills */
.fluent_form_3 .ff-checkbox-pills .ff-el-input--label,
.fluent_form_3 .ff-checkbox-pills .ff-el-input--label label {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 12px !important;
}

/* ==============================================
   5. CHAMPS DE SAISIE STANDARD
   ============================================== */

.fluent_form_3 input[type="text"],
.fluent_form_3 input[type="number"],
.fluent_form_3 input[type="email"],
.fluent_form_3 input[type="tel"],
.fluent_form_3 select,
.fluent_form_3 textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fluent_form_3 input:focus,
.fluent_form_3 select:focus,
.fluent_form_3 textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.1);
}

.fluent_form_3 input::placeholder {
    color: #999;
}

/* ==============================================
   6. SUFFIXE DANS L'INPUT (m², CHF)
   ============================================== */

.fluent_form_3 .ff_input-group {
    display: flex;
    align-items: center;
    position: relative;
}

.fluent_form_3 .ff_input-group input {
    padding-right: 50px !important;
    width: 100%;
}

.fluent_form_3 .ff_input-group-append {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.fluent_form_3 .ff_input-group-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    background: transparent;
    border: none;
    padding: 0;
}

/* ==============================================
   7. RANGE SLIDER (État du bien)
   ============================================== */

.fluent_form_3 .rangeslider {
    height: 8px !important;
    border-radius: 4px !important;
    background: linear-gradient(to left, 
        #1a5f4a 0%, 
        #3d8b6e 30%, 
        #7cb342 50%, 
        #c0ca33 65%, 
        #ffb300 80%, 
        #ff8f00 100%
    ) !important;
    box-shadow: none !important;
}

.fluent_form_3 .rangeslider__fill {
    background: transparent !important;
    box-shadow: none !important;
}

.fluent_form_3 .rangeslider__handle {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    background: var(--bg-white) !important;
    border: 3px solid var(--primary-color) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer;
    top: -8px !important;
    transition: transform 0.2s;
}

.fluent_form_3 .rangeslider__handle:hover {
    transform: scale(1.1) !important;
}

.fluent_form_3 .ff_range_value {
    font-weight: bold;
    margin-left: 10px;
}

/* Labels pour Range Slider */
.fluent_form_3 .ff_slider_wrapper .ff-el-input--label,
.fluent_form_3 .ff_slider_wrapper .ff-el-input--label label,
.fluent_form_3 .ff-el-group:has(.rangeslider) .ff-el-input--label,
.fluent_form_3 .ff-el-group:has(.rangeslider) .ff-el-input--label label {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 12px !important;
}

/* ==============================================
   8. PROGRESS BAR
   ============================================== */

.fluent_form_3 .ff-step-header {
    margin-bottom: 24px;
}

.fluent_form_3 .ff-el-progress-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.fluent_form_3 .ff-el-progress {
    background: var(--border-color);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.fluent_form_3 .ff-el-progress-bar {
    background: var(--button-color) !important;
    border-radius: 4px;
    height: 100%;
}

.fluent_form_3 .ff-el-progress-bar span {
    display: none;
}

/* ==============================================
   9. NAVIGATION MULTI-STEP (Boutons)
   ============================================== */

.fluent_form_3 .ff-step-nav,
.fluent_form_3 .ff_step_nav_wrapper,
.fluent_form_3 .step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Bouton Précédent / Retour */
.fluent_form_3 .ff-btn-prev,
.fluent_form_3 .ff_prev_btn,
.fluent_form_3 button.ff-btn-secondary,
.fluent_form_3 button[data-action="prev"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent !important;
    color: var(--text-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fluent_form_3 .ff-btn-prev:hover,
.fluent_form_3 .ff_prev_btn:hover,
.fluent_form_3 button.ff-btn-secondary:hover,
.fluent_form_3 button[data-action="prev"]:hover {
    background: var(--bg-light) !important;
    border-color: var(--text-muted) !important;
}

/* Bouton Suivant / Continuer */
.fluent_form_3 .ff-btn-next,
.fluent_form_3 .ff_next_btn,
.fluent_form_3 button.ff-btn-primary,
.fluent_form_3 button[data-action="next"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--button-color) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.fluent_form_3 .ff-btn-next:hover,
.fluent_form_3 .ff_next_btn:hover,
.fluent_form_3 button.ff-btn-primary:hover,
.fluent_form_3 button[data-action="next"]:hover {
    background: var(--button-hover) !important;
}
/* ==============================================
   FIX BOUTON SUBMIT - CIBLAGE ff_btn_style
   ============================================== */

/* Fix layout dernière étape - boutons sur même ligne */
.fluent_form_3 .ff-inner_submit_container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.fluent_form_3 .ff-inner_submit_container .ff-t-cell {
    flex: none !important;
}

.fluent_form_3 .ff-inner_submit_container .step-nav {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.fluent_form_3 .ff_submit_btn_wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* ==============================================
   10. GRILLE 2 COLONNES
   ============================================== */

.fluent_form_3 .ff-t-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ==============================================
   11. INFO BOX / HTML PERSONNALISÉ
   ============================================== */

.fluent_form_3 .ff-el-section-break,
.fluent_form_3 .ff_custom_html {
    background: var(--bg-light);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==============================================
   12. RESPONSIVE
   ============================================== */

@media (max-width: 768px) {
    .fluent_form_3 {
        padding: 24px 20px;
    }
    
    .fluent_form_3 .ff-image-cards .ff_el_checkable_photo_holders {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .fluent_form_3 .ff-image-cards .ff-el-image-holder {
        padding: 16px 12px;
        min-height: 100px;
    }
    
    .fluent_form_3 .ff-t-container {
        grid-template-columns: 1fr;
    }
    
    .fluent_form_3 .ff-step-nav,
    .fluent_form_3 .ff_step_nav_wrapper,
    .fluent_form_3 .step-nav {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .fluent_form_3 .ff-btn-prev,
    .fluent_form_3 .ff_prev_btn,
    .fluent_form_3 .ff-btn-next,
    .fluent_form_3 .ff_next_btn,
    .fluent_form_3 .ff-btn-submit,
    .fluent_form_3 button.ff-btn-primary,
    .fluent_form_3 button.ff-btn-secondary,
    .fluent_form_3 button[type="submit"] {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .fluent_form_3 .ff-image-cards .ff_el_checkable_photo_holders {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   13. ANIMATIONS
   ============================================== */

.fluent_form_3 .ff-el-group {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   14. ERREURS
   ============================================== */

.fluent_form_3 .ff-el-is-error input,
.fluent_form_3 .ff-el-is-error select {
    border-color: #e74c3c;
}

.fluent_form_3 .ff-el-is-error .error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ==============================================
   15. OVERRIDES & FIXES GÉNÉRAUX
   ============================================== */

.fluent_form_3 .ff-el-group {
    border: none !important;
    box-shadow: none !important;
}

/* ==============================================
   MESSAGE DE CONFIRMATION / SUCCÈS
   ============================================== */

.ff-success-message {
    text-align: center;
    padding: 40px 30px;
}

.ff-success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #6b9080 0%, #1a5f4a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 15px rgba(26, 95, 74, 0.3);
    animation: scaleIn 0.5s ease;
}

.ff-success-message h3 {
    color: #1a5f4a;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.ff-success-message p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.ff-redirect-notice {
    color: #888 !important;
    font-size: 0.9rem !important;
    margin-top: 20px !important;
}

.ff-redirect-notice span {
    font-weight: 600;
    color: #1a5f4a;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Supprimer le cadre du container Fluent Forms après soumission */
.fluent_form_3 .ff-message-success,
.fluentform .ff-message-success {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}