/* ---------------------- BASE & LAYOUT ---------------------- */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f4f9; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; /* Utilisation de min-height pour s'adapter au contenu */
    color: #333;
}

/* ---------------------- HEADER ---------------------- */
header { 
    background-color: #007bff; /* Bleu Utopie */
    color: white; 
    padding: 20px; 
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    text-align: center;
}
header h2 {
    margin: 0;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ---------------------- PANNEAU DE CONTEXTE (Intro) ---------------------- */
.context-panel {
    padding: 25px 30px;
    background-color: #e3f2fd; /* Bleu très clair */
    border-bottom: 3px solid #007bff;
    text-align: center;
}
.context-panel h1 {
    color: #333;
    font-size: 1.8em;
    margin-top: 0;
}
.context-panel p {
    font-size: 1.1em;
    color: #555;
}

/* ---------------------- PANNEAU DE CONTRÔLES ---------------------- */
.controls-panel { 
    padding: 20px 30px; 
    background-color: #ffffff; 
    border-bottom: 1px solid #ddd; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
}
.file-label {
    font-weight: bold;
    margin-right: 15px;
    color: #007bff;
}

/* Style de l'input fichier */
#fileInput {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;

}
.info-box { 
    font-size: 1em; 
    display: flex;
    gap: 30px; 
    font-weight: 500;

}
#dimensions-info, #volume-info { 
    font-weight: bold; 
    color: #28a745; /* Vert pour les résultats clés */
}
.calculation-note {
    font-weight: normal;
    font-style: italic;
    color: #999;
    font-size: 0.9em;
}

/* ---------------------- CONTENEUR DE VISUALISATION 3D ---------------------- */
#visualization-container { 
    flex-grow: 1; 
    min-height: 60vh; /* Assure une bonne hauteur pour le viewer */
    background-color: #2c3e50;
    cursor: grab;
    border-top: 3px solid #ff6600; /* Ligne de séparation orange */

}

/* ---------------------- SECTION D'ANALYSE (La Suite) ---------------------- */
.analysis-section {
    padding: 30px;
    background-color: #ffffff;
    border-top: 3px solid #ff6600; /* Ligne de séparation orange */
}
.analysis-section h2 {
    color: #007bff;
    text-align: center;
    margin-bottom: 25px;
}

.analysis-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.impact-card {
    flex: 1 1 300px; /* Base 300px, permet de s'adapter */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}
.impact-card:hover {
    transform: translateY(-5px);
}
.impact-card h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid;
    font-size: 1.2em;
    font-weight: 600;
}

.impact-card.eco {
    background-color: #e6f7ff;
    border-left: 5px solid #28a745; /* Vert pour l'écologie */
}
.impact-card.eco h3 {
    color: #28a745;
    border-bottom-color: #28a74555;
}

.impact-card.repair {
    background-color: #fff3e6;
    border-left: 5px solid #ff6600; /* Orange pour la durabilité/réparation */
}
.impact-card.repair h3 {
    color: #ff6600;
    border-bottom-color: #ff660055;
}

.impact-card.next-step {
    background-color: #f0e6ff;
    border-left: 5px solid #8f58b8; /* Violet/Mauve pour le futur/évaluation */
}
.impact-card.next-step h3 {
    color: #8f58b8;
    border-bottom-color: #8f58b855;
}

.final-message {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
    color: #555;
    font-style: italic;
}

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 950px) {
    .analysis-grid {
        flex-direction: column;
        align-items: center;
    }
    .impact-card {
        flex-basis: 90%;
    }
}
@media (max-width: 600px) {
    .controls-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .info-box {
        flex-direction: column;
        gap: 5px;
        font-size: 0.9em;
    }
}