:root {
    --odc-primary: #2c5f47;
    --odc-secondary: #4e8c6f;
    --odc-bg-light: #ecf5f0;
    --odc-alert: #d9534f;
    --odc-gold: #c5a065;
}

/* --- CONTENEUR GLOBAL --- */
.co2-wrapper {
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit; 
    color: var(--odc-primary);
}

/* --- LAYOUT GRILLE (Bureau) --- */
.co2-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; /* 40% / 60% */
    gap: 50px; 
    
    /* CENTRAGE VERTICAL : C'est cette ligne qui centre la colonne gauche */
    align-items: center; 
}

/* --- COLONNE GAUCHE --- */
.co2-col-info {
    text-align: left;
    display: block;
}

.co2-col-info h2 {
    color: var(--odc-primary);
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.2;
}

.co2-intro {
    font-size: 1rem; 
    line-height: 1.6;
    color: inherit;
    opacity: 0.9;
    /* Même si margin est 0px globalement, le spacer en dessous fera le travail */
    margin: 0; 
}
/* --- FORMULAIRE --- */
.co2-input-wrapper {
    background: var(--odc-bg-light);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 30px; /* Espace sous le formulaire avant résultats */
}

.co2-input-wrapper label {
    display: block;
    font-family: inherit;
    font-weight: 700;
    color: var(--odc-primary);
    margin-bottom: 12px;
    font-size: 1rem;
}

.co2-input-wrapper input[type="month"] {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1rem;
    color: var(--odc-primary);
    font-family: inherit;
    box-sizing: border-box;
    cursor: pointer;
}

.co2-input-wrapper input[type="month"]:focus {
    border-color: var(--odc-primary);
    outline: none;
}

/* --- RÉSULTATS --- */
.co2-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-card {
    background: #fcfcfc;
    padding: 20px 15px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.result-card.highlight {
    background: #fff;
    border: 2px solid var(--odc-bg-light);
}

.result-val {
    font-family: inherit;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--odc-primary);
    line-height: 1;
    margin-bottom: 8px;
    display: block;
}

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 600;
}

.limit-warning { color: var(--odc-alert); font-size: 0.85rem; font-weight: 700; margin-top: 8px; display:block; }
.limit-safe { color: var(--odc-secondary); font-size: 0.85rem; font-weight: 700; margin-top: 8px; display:block; }

/* --- COLONNE DROITE (Graphique) --- */
.co2-col-right {
    width: 100%;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.source-credit {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 10px;
    font-style: italic;
    text-align: right;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .co2-layout {
        grid-template-columns: 1fr; /* 1 colonne */
        gap: 40px;
    }
    
    /* Sur mobile, on peut réduire un peu l'espaceur si besoin */
    .odc-spacer { height: 20px; }

    .chart-container {
        height: 300px;
    }
    
    .result-val {
        font-size: 1.8rem;
    }
    
    /* Le texte sera au dessus, le graph en dessous grâce à l'ordre HTML naturel */
}