/* ESCALE4 — section « Satellites » : deux enceintes qui tournent à l'arrivée, cotes de la blanche, vue éclatée, grande fenêtre (eclate.js). v3
   Même présentation que les caissons (caissons.css / caissons-eclate.css), avec ses propres classes. */
.e4 { position: relative; margin-top: clamp(40px, 6vh, 72px); --e4-gap: clamp(20px, 4vw, 72px); }
.e4-duo { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--e4-gap); max-width: 1120px; margin: 0 auto; }
.e4-vue { position: relative; min-width: 0; aspect-ratio: 4 / 5; }
.e4-vue canvas { display: block; width: 100%; height: 100%; }
.e4-toile { position: absolute; left: 0; top: 0; width: calc(100% - var(--e4-gap)); height: auto; aspect-ratio: 8 / 5; pointer-events: none; opacity: 0; }
.e4.est-large .e4-toile { opacity: 1; }
.e4.est-large .e4-vue:first-child canvas { opacity: 0; }
.e4.est-eclate .e4-cotes, .e4.est-eclate .e4-val { opacity: 0 !important; }
.e4.est-eclate .rejouer { opacity: 0; pointer-events: none; }
.e4 .rejouer { right: 0; bottom: 0; }

/* Cotes : mêmes traits que ceux des caissons */
.e4-cotes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transition: opacity 0.25s ease; }
.e4-cotes path { fill: none; stroke: rgba(242, 241, 237, 0.62); stroke-width: 1; stroke-linecap: butt; }
.e4-trait { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.e4-butee { opacity: 0; }
.e4-val { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
  font-size: 13px; line-height: 1; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--ink, #f2f1ed); white-space: nowrap; }
.e4-val i { font-style: normal; font-weight: 400; color: var(--ink-2, #a9acb0); }

/* Barre : même pilule que celle des caissons */
.e4-barre { display: flex; justify-content: center; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 14px; }
.e4-choix, .ecl-choix { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2, #25262a); border: 1px solid var(--line, rgba(242, 241, 237, 0.09)); }
.e4-choix button { font: inherit; font-size: 14px; color: var(--ink, #f2f1ed); background: none; border: 0; border-radius: 999px; padding: 8px 18px; min-height: 40px; min-width: 9.5em; cursor: pointer;
  transition: background-color 0.2s ease, transform 160ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ecl-choix button, .ecl-agrandir { font: inherit; font-size: 14px; color: var(--ink-2, #a9acb0); background: none; border: 0; border-radius: 999px; padding: 8px 18px; min-height: 40px; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 160ms ease-out; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.ecl-choix button[aria-pressed="true"] { background: var(--ink, #f2f1ed); color: var(--bg, #1d1e21); }
.e4-choix button:active, .ecl-choix button:active, .ecl-agrandir:active, .ecl-fermer:active { transform: scale(0.97); }
.e4-choix button:focus-visible, .ecl-choix button:focus-visible, .ecl-agrandir:focus-visible, .ecl-fermer:focus-visible { outline: 2px solid var(--accent, #dc9676); outline-offset: 2px; }
@media (hover: hover) { .e4-choix button:hover { background: var(--bg-3, #2c2d32); } .ecl-agrandir:hover { color: var(--ink, #f2f1ed); } }
.ecl-agrandir { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; }

/* La grande fenêtre : visionneuse libre (tourner au doigt, Blanc / Noir, éclaté). Surface translucide qui part du bouton « Agrandir » et y retourne. */
.ecl-fenetre {
  position: fixed; inset: 0; margin: auto; padding: 0; border: 0; color: var(--ink, #f2f1ed); text-align: center;
  width: min(1180px, calc(100vw - 32px)); height: min(860px, calc(100dvh - 32px)); max-width: none; max-height: none;
  border-radius: 28px; overflow: hidden; background: rgba(44, 45, 50, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(242, 241, 237, 0.10) inset, 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 40px 120px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translate(var(--ecl-dx, 0px), var(--ecl-dy, 24px)) scale(0.9);
  transition: opacity 0.26s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), overlay 0.42s allow-discrete, display 0.42s allow-discrete;
}
.ecl-fenetre[open] { opacity: 1; transform: none; }
@starting-style { .ecl-fenetre[open] { opacity: 0; transform: translate(var(--ecl-dx, 0px), var(--ecl-dy, 24px)) scale(0.9); } }
.ecl-fenetre::backdrop { background: rgba(10, 10, 12, 0); transition: background-color 0.3s ease, overlay 0.42s allow-discrete, display 0.42s allow-discrete; }
.ecl-fenetre[open]::backdrop { background: rgba(10, 10, 12, 0.62); }
@starting-style { .ecl-fenetre[open]::backdrop { background: rgba(10, 10, 12, 0); } }
.ecl-int { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.ecl-tete { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 28px; }
.ecl-titre { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.ecl-fermer { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: rgba(242, 241, 237, 0.10); color: var(--ink, #f2f1ed); transition: background-color 0.2s ease, transform 0.1s ease-out; }
.ecl-fermer:hover { background: rgba(242, 241, 237, 0.18); }
/* scène unie : pas de halo derrière l'enceinte */
.ecl-scene { position: relative; min-height: 0; margin: 8px 16px 0; border-radius: 20px; background: #34363b; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; outline: none; }
.ecl-scene.est-saisie { cursor: grabbing; }
.ecl-scene.est-clavier:focus { box-shadow: 0 0 0 1px rgba(242, 241, 237, 0.55) inset; }      /* anneau discret, au clavier seulement */
.ecl-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ecl-charge { position: absolute; left: 30%; right: 30%; bottom: 12px; height: 2px; border-radius: 1px; background: rgba(242, 241, 237, 0.12); overflow: hidden; opacity: 0; transition: opacity 0.3s ease; }
.ecl-charge.est-actif { opacity: 1; }
.ecl-charge i { display: block; height: 100%; background: var(--ink, #f2f1ed); transform-origin: left; transform: scaleX(0); transition: transform 0.2s ease-out; }
.ecl-barre { display: flex; justify-content: center; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 14px 16px 20px; }

@media (max-width: 760px) {
  .e4 { --e4-gap: 24px; }
  .e4-val { font-size: 11px; }
  .e4 .rejouer { position: static; margin: 12px auto 0; display: flex; width: max-content; }
}
@media (max-width: 560px) {
  .ecl-fenetre { width: 100vw; height: 100dvh; border-radius: 0; }
  .ecl-tete { padding: 12px 12px 0 20px; }
  .ecl-scene { margin: 8px 8px 0; }
  .ecl-choix button { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .e4-toile, .e4-vue canvas { transition: opacity 0.2s ease; }
  .ecl-fenetre, .ecl-fenetre[open] { transform: none; transition: opacity 0.2s ease, overlay 0.2s allow-discrete, display 0.2s allow-discrete; }
  @starting-style { .ecl-fenetre[open] { transform: none; } }
  .e4-choix button:active, .ecl-choix button:active, .ecl-agrandir:active, .ecl-fermer:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) { .ecl-fenetre { background: #2c2d32; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-contrast: more) {
  .e4-cotes path { stroke: var(--ink, #f2f1ed); }
  .ecl-fenetre { background: #232428; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 0 2px #f2f1ed inset; }
  .e4-choix, .ecl-choix { border-color: #f2f1ed; }
}
