:root {
    /* CHARTE EDF */
    --edf-blue: #001A70;
    --edf-mid-blue: #005BBB;
    --edf-light-blue: #297FD5;
    --edf-orange: #FE5800;
    
    /* COULEURS SEMANTIQUES */
    --safety-red: #DC2626;
    --env-green: #15803d;
    
    --bg-body: #F5F7FA;
    --text-main: #1F2937;
    --text-light: #6B7280;
    --border: #E5E7EB;
}

/* Styles de base */
body { font-family: 'Inter', sans-serif; background-color: var(--bg-body); color: var(--text-main); padding: 30px 20px; margin: 0; }
.container { max-width: 1200px; margin: 0 auto; }

/* En-tête */
.header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--border); padding-bottom: 20px; margin-bottom: 30px; }
h2 { margin: 0; color: var(--edf-blue); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.date-maj { font-size: 0.85rem; color: var(--text-main); background: #fff; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* Zone KPI */
.kpi-row { display: flex; gap: 20px; margin-bottom: 30px; }
.kpi-card { flex: 1; background: #fff; padding: 24px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.kpi-card h3 { margin: 0 0 10px 0; font-size: 0.75rem; color: var(--text-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 2.8rem; font-weight: 800; color: var(--edf-mid-blue); line-height: 1; }
.kpi-unit { font-size: 1rem; color: var(--text-light); font-weight: 600; margin-left: 5px;}
.statut-marche { color: var(--env-green); }
.statut-total { color: var(--text-light); font-size: 1.5rem; }

/* FOCUS CENTRAL */
.highlight-section { margin-bottom: 20px; }
.section-title { font-size: 1rem; color: var(--text-light); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin: 0;}

/* NOUVEAU : Le menu de sélection du Focus */
.focus-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.focus-select { 
    padding: 8px 16px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    font-family: inherit; 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--edf-blue); 
    background-color: #fff; 
    cursor: pointer; 
    outline: none; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.focus-select:focus { border-color: var(--edf-light-blue); box-shadow: 0 0 0 3px rgba(41, 127, 213, 0.1); }

.penly-card { background: var(--edf-blue); color: #fff; border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0, 26, 112, 0.4); cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
.penly-card:hover { transform: translateY(-4px); box-shadow: 0 15px 30px -5px rgba(0, 26, 112, 0.5); }
.penly-header { padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.penly-nom-row { display: flex; justify-content: space-between; align-items: center; }
.penly-nom { font-size: 1.8rem; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 12px; }

/* Le badge orange est prêt à se placer avant le nom */
.penly-badge { background: var(--edf-orange); color: #fff; font-size: 0.8rem; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800;}

.penly-prod { font-size: 3.5rem; font-weight: 800; line-height: 1; margin-top: 5px;}
.penly-prod-unite { font-size: 1.2rem; color: rgba(255,255,255,0.7); font-weight: 600; }
.penly-stats-row { font-size: 0.85rem; color: rgba(255,255,255,0.8); display: flex; gap: 20px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 15px; margin-top: 10px; font-weight: 700; text-transform: uppercase; }
.penly-arrow { position: absolute; top: 35px; right: 30px; color: rgba(255,255,255,0.5); transition: transform 0.3s; font-size: 1rem; }
.penly-card.active .penly-arrow { transform: rotate(180deg); color: #fff; }

/* CORRECTION DU SAUT DE TEXTE (Focus) : On laisse padding: 0 30px permanent ! */
.penly-details { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, padding 0.3s ease-out; background-color: rgba(0,0,0,0.2); padding: 0 30px; }
.penly-card.active .penly-details { max-height: 600px; padding: 10px 30px 20px 30px; }

.penly-unite-line { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1rem; }
.penly-unite-line:last-child { border-bottom: none; }
.penly-unite-nom { font-weight: 700; }
.penly-unite-prod { font-family: monospace; font-weight: 600; font-size: 1.2rem; color: #fff;}

/* RESTE DU PARC */
.grid-centrales { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.centrale-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; cursor: pointer; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.centrale-card:hover { border-color: var(--edf-light-blue); transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.centrale-header { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.centrale-nom-row { display: flex; justify-content: space-between; align-items: center; }
.centrale-nom { font-size: 1.1rem; font-weight: 800; color: var(--edf-blue); margin: 0; }
.centrale-prod { font-size: 1.6rem; font-weight: 800; color: var(--text-main); }
.centrale-prod-unite { font-size: 0.85rem; color: var(--text-light); font-weight: 600; }
.centrale-stats-row { font-size: 0.75rem; color: var(--text-light); display: flex; gap: 15px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; font-weight: 700; text-transform: uppercase; }
.icon-arrow { position: absolute; top: 22px; right: 20px; color: #9CA3AF; transition: transform 0.3s; font-size: 0.8rem; }
.centrale-card:hover .icon-arrow { color: var(--edf-mid-blue); }
.centrale-card.active .icon-arrow { transform: rotate(180deg); color: var(--edf-orange); }

/* CORRECTION DU SAUT DE TEXTE (Normal) : On laisse padding: 0 20px permanent ! */
.unites-details { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, padding 0.3s ease-out; background-color: #F9FAFB; padding: 0 20px; }
.centrale-card.active .unites-details { max-height: 600px; border-top: 1px solid var(--border); padding: 10px 20px; }

.unite-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.unite-line:last-child { border-bottom: none; }
.unite-nom-grp { display: flex; align-items: center; gap: 10px; }
.unite-nom { color: var(--text-main); font-weight: 700; }
.unite-prod { color: var(--edf-mid-blue); font-family: monospace; font-weight: 600; font-size: 0.95rem;}

/* Pastilles */
.status-dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; }
.status-on { background-color: var(--env-green); box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2); } 
.status-off { background-color: #D1D5DB; } 
.status-on-penly { background-color: #3fb950; box-shadow: 0 0 0 2px rgba(63, 185, 80, 0.3); } 
.status-off-penly { background-color: rgba(255,255,255,0.3); } 

/* FOOTER SOURCE */
.footer { margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; font-size: 0.85rem; color: var(--text-light); }
.footer a { color: var(--edf-mid-blue); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer a:hover { color: var(--edf-orange); text-decoration: underline; }