/* L'Hexagone décodé — salle 4, énergie et climat : seulement les ajouts propres à la salle.
   Tout le reste (consoles, touches, cartels, graphiques) vient de css/atelier.css. */

/* ---------- Couleurs des filières, des énergies et des secteurs ----------
   Conventions proches de celles de RTE (nucléaire jaune, hydraulique bleu, éolien vert d'eau,
   solaire orange, bioénergies vert, gaz rouge, charbon brun), éclaircies pour le fond marine. */
:root {
  --c-nucleaire: #f2c230;
  --c-hydraulique: #3b82d6;
  --c-eolien: #6fd0bd;
  --c-solaire: #f08a2c;
  --c-bio: #2f9e6a;
  --c-gaz: #e2574c;
  --c-charbon: #a0815a;
  --c-petrole: #c9653a;
  --c-elec: #f2c230;
  --c-enr: #2f9e6a;
  --c-chaleur: #b48ad8;
}
.f-nucleaire { fill: var(--c-nucleaire); background: var(--c-nucleaire); }
.f-hydraulique { fill: var(--c-hydraulique); background: var(--c-hydraulique); }
.f-eolien { fill: var(--c-eolien); background: var(--c-eolien); }
.f-solaire { fill: var(--c-solaire); background: var(--c-solaire); }
.f-bioenergies { fill: var(--c-bio); background: var(--c-bio); }
.f-gaz { fill: var(--c-gaz); background: var(--c-gaz); }
.f-charbon { fill: var(--c-charbon); background: var(--c-charbon); }
.f-fossile { fill: var(--c-gaz); background: var(--c-gaz); }
i.puce { display: inline-block; width: 13px; height: 13px; border-radius: 2px; flex: none; }

.e-petrole { fill: var(--c-petrole); } .e-petrole-bg { background: var(--c-petrole); }
.e-electricite { fill: var(--c-elec); } .e-electricite-bg { background: var(--c-elec); }
.e-gaz { fill: var(--c-gaz); } .e-gaz-bg { background: var(--c-gaz); }
.e-enr_thermiques { fill: var(--c-enr); } .e-enr_thermiques-bg { background: var(--c-enr); }
.e-chaleur { fill: var(--c-chaleur); } .e-chaleur-bg { background: var(--c-chaleur); }
.e-charbon { fill: var(--c-charbon); } .e-charbon-bg { background: var(--c-charbon); }

.s-transports { fill: var(--c-petrole); }
.s-agriculture { fill: var(--c-bio); }
.s-industrie { fill: #8d99c9; }
.s-batiments { fill: var(--c-hydraulique); }
.s-energie { fill: var(--c-nucleaire); }
.s-dechets { fill: var(--c-charbon); }

/* ---------- Commandes reprises des autres salles ---------- */
.fleches { display: flex; gap: 12px; align-items: center; }
.fleches .afficheur { min-width: 110px; justify-content: center; font-size: 28px; }

/* ---------- Photos : cadre de musée et cartel (mêmes règles que la salle 2) ---------- */
.photo-musee { margin: 0; min-width: 0; }
.photo-cadre { position: relative; background: var(--nuit); box-shadow: 0 0 0 1px var(--trait), 0 0 0 10px var(--plaque-2), 0 0 0 11px var(--trait); margin: 11px; overflow: hidden; aspect-ratio: 3 / 2; }
.photo-cadre img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.photo-cartel { display: grid; gap: 4px; margin: 20px 11px 0; padding: 10px 14px 12px; background: var(--papier); color: var(--encre); border-left: 4px solid var(--ambre); font-size: 15px; line-height: 1.4; }
.photo-legende { font-size: 16px; }
.photo-credit { font-size: 13px; color: var(--encre-2); }
.photo-credit a { color: var(--encre); }
.frise-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.frise-item { position: relative; min-width: 0; }
.frise-item .photo-cadre { aspect-ratio: 4 / 3; margin: 0; box-shadow: 0 0 0 1px var(--trait); transition: box-shadow .15s; }
.frise-item:hover .photo-cadre, .frise-item:focus-within .photo-cadre { box-shadow: 0 0 0 3px var(--ambre); }
.frise-item .photo-cartel { margin: 0; padding: 0; background: none; border: 0; }
.frise-item .photo-credit { font-size: 12px; color: var(--texte-3); margin-top: 6px; }
.frise-item .photo-credit a { color: var(--texte-2); }
.frise-nom { position: absolute; left: 0; top: 0; background: var(--marine); color: var(--texte); font: 600 17px/1 var(--f-signal); padding: 8px 10px 7px; text-decoration: none; min-height: 32px; }
.frise-nom:hover { background: var(--ambre); color: var(--encre); }
.intro-photo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 44px; align-items: start; }
.intro-photo .chap-intro { padding-top: 4px; }
.credits-photos { margin-top: 28px; }
.credits-photos ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; color: var(--texte-2); display: grid; gap: 4px; max-width: 90ch; }
.credits-photos b { color: var(--texte); font-weight: 700; }

/* ---------- 1.1 La centrale à mix ---------- */
.mix-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 30px; align-items: start; }
.mix-schema svg { display: block; }
text.mix-pct { font: 700 17px var(--f-signal); fill: var(--texte); pointer-events: none; }
text.mix-pct.sombre { fill: var(--encre); }
.mix-grad { stroke: var(--texte-3); stroke-width: 1; }
text.mix-grad-t { font: 500 13px var(--f-mono); fill: var(--texte-3); }
.mix-repere { stroke: var(--texte-3); stroke-width: 1; stroke-dasharray: 2 2; }
.mix-repere.fr { stroke: var(--texte); stroke-dasharray: none; }
text.mix-repere-t { font-family: var(--f-texte); fill: var(--texte-2); }
text.mix-repere-t.fr { fill: var(--texte); font-weight: 700; }
.mix-aiguille { fill: var(--ambre); stroke: var(--nuit); stroke-width: 1.5; }
text.mix-valeur { font-family: var(--f-signal); font-weight: 700; fill: var(--ambre); }
.mix-curseurs { display: grid; gap: 4px; }
.mix-curseur { display: grid; grid-template-columns: 7.6em minmax(0, 1fr) 2.8em; gap: 10px; align-items: center; }
.mix-curseur label { display: flex; align-items: center; gap: 8px; font: 600 17px/1.1 var(--f-signal); }
.mix-curseur output { font: 600 17px var(--f-mono); color: var(--ambre); text-align: right; font-variant-numeric: tabular-nums; }
.mix-curseur input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer; }
.mix-curseur input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--nuit); box-shadow: inset 0 0 0 1px var(--trait); }
.mix-curseur input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--nuit); box-shadow: inset 0 0 0 1px var(--trait); }
.mix-curseur input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 34px; margin-top: -13px; border: 0; border-radius: 3px; background: linear-gradient(90deg, transparent 9px, var(--encre) 9px 13px, transparent 13px), var(--touche); box-shadow: 0 3px 0 var(--touche-bord); }
.mix-curseur input[type="range"]::-moz-range-thumb { width: 22px; height: 34px; border: 0; border-radius: 3px; background: linear-gradient(90deg, transparent 9px, var(--encre) 9px 13px, transparent 13px), var(--touche); box-shadow: 0 3px 0 var(--touche-bord); }
.mix-curseur input[type="range"]:active::-webkit-slider-thumb { background: linear-gradient(90deg, transparent 9px, var(--encre) 9px 13px, transparent 13px), var(--ambre); }
.mix-curseur input[type="range"]:focus-visible { outline: none; }
.mix-curseur input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 3px 0 var(--touche-bord), 0 0 0 3px var(--marine), 0 0 0 6px var(--texte); }
.mix-note { font-size: 14px; color: var(--texte-3); margin: 8px 0 0; }
#mix-presets .touche { min-width: 0; }

/* + Évolution */
.evo-aire { stroke: var(--plaque); stroke-width: .6; transition: opacity .2s; }
.evo-aire.eteinte { opacity: .18; }
.vt-ligne { display: flex; align-items: center; gap: 8px; }

/* ---------- 2.1 Le parc nucléaire ---------- */
.parc-schema svg { display: block; max-width: 620px; margin: 0 auto; }
.parc-france { fill: #1b2858; stroke: var(--texte-3); stroke-width: 1.4; stroke-linejoin: round; }
.parc-paris { fill: var(--texte-2); }
text.parc-paris-t { font-family: var(--f-texte); fill: var(--texte-2); font-style: italic; }
.parc-site { cursor: pointer; outline: none; }
.parc-cadre { fill: transparent; stroke: transparent; stroke-width: 2; }
.parc-site:hover .parc-cadre { stroke: var(--texte-3); }
.parc-site:focus-visible .parc-cadre { stroke: var(--texte); stroke-width: 3; }
.parc-site.choisi .parc-cadre { stroke: var(--ambre); stroke-width: 2.5; fill: rgba(255, 162, 31, .12); }
.parc-reacteur { fill: var(--d-gris); stroke: var(--nuit); stroke-width: 1; }
.parc-reacteur.allume { fill: var(--ambre); }
.parc-reacteur.epr { stroke: var(--texte); stroke-width: 1.5; }
text.parc-nom { font-family: var(--f-signal); font-weight: 700; fill: var(--texte); paint-order: stroke; stroke: var(--plaque); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- 2.2 L'EPR ---------- */
.m-proj-total { fill: rgba(208, 127, 0, .3); stroke: var(--d-france); stroke-width: 1.5; stroke-dasharray: 4 3; }
.epr-frise { margin-top: 18px; }
.epr-frise svg { display: block; max-width: 680px; }
.epr-axe { stroke: var(--texte-3); stroke-width: 1.2; }
text.epr-an { font: 500 13px var(--f-mono); fill: var(--texte-3); }
.epr-prevu { stroke: var(--texte-2); stroke-width: 5; stroke-dasharray: 5 3; }
.epr-reel { stroke: var(--d-france); stroke-width: 5; }
text.epr-t { font-family: var(--f-texte); fill: var(--texte-2); }
text.epr-t.fort { fill: var(--texte); font-weight: 700; }
.epr-curseur { fill: var(--ambre); }
#epr .glissiere .graduations span { font-size: 12px; }

/* ---------- 3.1 Consommation (gaufre) ---------- */
.conso-zone { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px 34px; align-items: center; }
.conso-zone .gaufre svg { width: 100%; height: auto; }
.conso-legende { display: grid; gap: 8px; margin: 0; }
.conso-legende li { display: grid; grid-template-columns: 16px minmax(0, 1fr) 2.6em; gap: 10px; align-items: center; font-size: 16px; color: var(--texte); }
.conso-legende li i { width: 16px; height: 16px; border-radius: 2px; }
.conso-legende li b { font: 600 20px/1 var(--f-mono); text-align: right; }
#conso-secteurs .touche, #ren-pays .touche { min-width: 0; }

/* ---------- 4.1 Courbe des émissions ---------- */
.obj-losange { fill: var(--texte); stroke: var(--plaque); stroke-width: 1.5; }
text.obj-t { font: 600 13px var(--f-signal); fill: var(--texte); paint-order: stroke; stroke: var(--plaque); stroke-width: 4px; stroke-linejoin: round; }
.legende i.losange { transform: rotate(45deg) scale(.75); }
path.ligne.s-invisible { stroke: none; }

/* ---------- 4.2 Secteurs ---------- */
.secteurs-schema svg { display: block; max-width: 760px; }
.sect-ligne { cursor: pointer; outline: none; }
.sect-fond { fill: transparent; }
.sect-ligne:hover .sect-fond { fill: rgba(243, 239, 228, .04); }
.sect-ligne:focus-visible .sect-fond { stroke: var(--texte); stroke-width: 2; }
.sect-ligne.choisi .sect-fond { fill: rgba(255, 162, 31, .1); }
.sect-ligne:not(.choisi) rect[class^="s-"] { opacity: .55; }
.sect-1990 { fill: none; stroke: var(--texte-2); stroke-width: 1.2; }
.sect-budget { stroke: var(--texte); stroke-width: 2; stroke-dasharray: 3 2; }
text.sect-nom { font-family: var(--f-signal); font-weight: 600; fill: var(--texte-2); }
.sect-ligne.choisi text.sect-nom { fill: var(--texte); }
text.sect-val { font: 600 15px var(--f-mono); fill: var(--texte); }
.legende i.vide-l { background: transparent; box-shadow: inset 0 0 0 1.5px var(--texte-2); }

/* ---------- 5.1 Comparer : légende du rotatif ---------- */
.rotatif-legende { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rotatif-legende li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; font: 600 18px/1.1 var(--f-signal); color: var(--texte-2); }
.rotatif-legende li b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--trait); font: 700 15px/1 var(--f-signal); }
.rotatif-legende li.actif { color: var(--texte); }
.rotatif-legende li.actif b { background: var(--ambre); color: var(--encre); box-shadow: none; }

/* ---------- 6. Bilan ---------- */
.point-energie { grid-template-columns: minmax(0, 1fr); }
.point-energie a { font-size: 15px; }
.point-energie .fig { font-size: 30px; }

/* ---------- 7. Débat ---------- */
.plateau li .qui { display: block; margin-top: 6px; font-size: 14px; color: var(--texte-2); }
.plateau li .qui a { color: var(--texte-2); }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 1080px) {
  .mix-grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .intro-photo { grid-template-columns: minmax(0, 1fr); }
  .frise-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .conso-zone { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .conso-legende { width: 100%; max-width: 360px; }
}
@media (max-width: 620px) {
  .photo-cadre { margin: 7px; box-shadow: 0 0 0 1px var(--trait), 0 0 0 6px var(--plaque-2), 0 0 0 7px var(--trait); }
  .photo-cartel { margin: 14px 7px 0; padding: 8px 10px 10px; }
  .photo-legende { font-size: 15px; }
  .frise-nom { font-size: 15px; padding: 5px 7px 4px; }
  .mix-curseur { grid-template-columns: 7.4em minmax(0, 1fr) 2.9em; gap: 8px; }
  .mix-curseur label { font-size: 16px; gap: 6px; }
  #mix-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; width: 100%; }
  #mix-presets .touche, #conso-secteurs .touche, #ren-pays .touche, #evo-filieres .touche, #parc-paliers .touche { font-size: 17px; padding: 7px 10px 9px; }
  #conso-secteurs, #ren-pays, #parc-paliers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; width: 100%; }
  .commande-etapes { flex-direction: column; align-items: flex-start; }
}
