/* ==========================================================================
   FICHIER : estimation.css
   DESCRIPTION : Styles isolés et Responsive pour l'estimateur de rachat
   ========================================================================== */

:root { 
    --primary: #2ecc71; 
    --dark: #2c3e50; 
    --light: #f4f7f6; 
    --orange: #f39c12; 
    --danger: #e74c3c; 
}

/* --- STRUCTURE PRINCIPALE --- */

#estimation-page-wrapper {
    padding-top: 30px; 
    padding-bottom: 50px;
    min-height: 80vh;
    background: var(--light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#estimation-page-wrapper .container { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 0 15px; /* Légèrement réduit pour mobile */
}

/* --- BARRE DE PROGRESSION --- */

#estimation-page-wrapper .progress-container { 
    margin: 30px auto; 
    display: flex !important; 
    justify-content: space-between !important; 
    position: relative !important; 
    max-width: 500px; 
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

#estimation-page-wrapper .progress-bar { 
    position: absolute !important; 
    top: 50% !important; 
    left: 10px !important; /* Ajusté avec le padding */
    width: calc(100% - 20px) !important; 
    height: 4px !important; 
    background: #ddd !important; 
    z-index: 1 !important; 
    transform: translateY(-50%) !important; 
}

#estimation-page-wrapper .progress-fill { 
    position: absolute !important; 
    top: 50% !important; 
    left: 10px !important; 
    height: 4px !important; 
    background: var(--primary) !important; 
    width: 0%; 
    z-index: 2 !important; 
    transform: translateY(-50%) !important; 
    transition: width 0.4s ease-in-out !important; 
}

#estimation-page-wrapper .dot { 
    width: 30px !important; /* Un peu plus petit sur mobile */
    height: 30px !important; 
    background: white !important; 
    border: 2px solid #ddd !important; 
    border-radius: 50% !important; 
    z-index: 3 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    font-size: 14px !important; 
    font-weight: bold !important; 
    color: #999 !important; 
    transition: 0.4s !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#estimation-page-wrapper .dot.active { 
    border-color: var(--primary) !important; 
    color: var(--primary) !important; 
    transform: scale(1.1) !important; 
}

/* --- ÉTAPES ET ANIMATIONS --- */

#estimation-page-wrapper .step { 
    display: none; 
    background: #fff; 
    padding: 20px 15px; /* Padding réduit pour écrans mobiles */
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    animation: fadeIn 0.3s; 
}

#estimation-page-wrapper .step.active { 
    display: block; 
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* --- GRILLE ET CARTES (Responsives) --- */

#estimation-page-wrapper .grid { 
    display: grid !important; 
    /* 2 colonnes sur mobile, adaptables */
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 10px !important; 
    margin-top: 20px !important; 
}

#estimation-page-wrapper .card { 
    padding: 15px 10px; /* Moins de padding sur mobile */
    border: 2px solid #f0f0f0; 
    border-radius: 15px; 
    cursor: pointer; 
    text-align: center; 
    transition: 0.2s; 
    background: #fff; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
}

#estimation-page-wrapper .card:hover { 
    border-color: var(--primary); 
    background: #fafffb; 
    transform: translateY(-2px);
}

/* --- BOUTONS OPTIONS DIAGNOSTIC --- */

#estimation-page-wrapper .diag-option-btn { 
    width: 100%; 
    padding: 15px; 
    margin: 8px 0; 
    border: 2px solid #eee; 
    border-radius: 12px; 
    background: white; 
    cursor: pointer; 
    font-weight: 600; 
    text-align: left;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    transition: 0.2s;
    font-size: 0.9em;
}

#estimation-page-wrapper .diag-option-btn:hover { 
    border-color: var(--primary); 
    background: #fafffb; 
}

#estimation-page-wrapper .diag-option-btn.perfect { border-left: 6px solid var(--primary); }
#estimation-page-wrapper .diag-option-btn.warning { border-left: 6px solid var(--orange); }
#estimation-page-wrapper .diag-option-btn.critical { border-left: 6px solid var(--danger); }

/* --- RÉSUMÉ ET RÉSULTAT FINAL --- */

#estimation-page-wrapper .btn-back { 
    background: transparent; 
    border: none; 
    color: #888; 
    cursor: pointer; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    padding: 10px 0;
    font-size: 1em;
}

#estimation-page-wrapper #prix-final { 
    /* Taille de police fluide : s'adapte à l'écran */
    font-size: clamp(2.5em, 8vw, 3.5em); 
    color: white; 
    font-weight: bold; 
    margin: 0; 
}

#estimation-page-wrapper .status-dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    flex-shrink: 0; /* Empêche le point de s'écraser sur mobile */
}

/* ALIGNEMENT À GAUCHE DU RÉSUMÉ */
#estimation-page-wrapper #diag-summary {
    text-align: left !important;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
}

#estimation-page-wrapper #summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

#estimation-page-wrapper #summary-list li { 
    padding: 8px 0; 
    border-bottom: 1px solid #f5f5f5; 
    display: flex !important; 
    justify-content: flex-start !important; 
    align-items: center;
    color: #666;
    font-size: 0.9em;
}

#estimation-page-wrapper #summary-list li:last-child { border-bottom: none; }

#estimation-page-wrapper #summary-list li::before { 
    content: "•"; 
    color: var(--primary); 
    margin-right: 10px; 
    font-weight: bold; 
}

/* --- ADAPTATION POUR PC / GRANDS ÉCRANS --- */
@media (min-width: 768px) {
    #estimation-page-wrapper .step {
        padding: 40px; /* Plus d'espace sur PC */
    }
    
    #estimation-page-wrapper .grid { 
        /* 3 colonnes sur PC pour les modèles */
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 15px !important; 
    }
    
    #estimation-page-wrapper .card {
        padding: 20px;
        font-size: 1em;
    }
    
    #estimation-page-wrapper .diag-option-btn {
        padding: 18px;
        font-size: 1em;
    }
    
    #estimation-page-wrapper .dot { 
        width: 35px !important; 
        height: 35px !important;
    }
}

