/* style.css */

/* ─── Reset & typo ───────────────────────────────────────── */
body {
  margin: 0;
  padding: 0;
  background: #111;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  overflow-x: hidden;
}

header {
  padding: 20px;
  background: #1a1a1a;
  border-bottom: 2px solid #333;
}

/* ─── Main & blocs ──────────────────────────────────────── */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 20px;
}

.image-block {
  background: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
  width: 100%;
  max-width: 1400px;
  box-sizing: border-box;
  margin: 0 auto;
}

/* ─── Conserve ratio d’origine & confinement ────────────── */
figure {
  margin: 0;
  position: relative;
  width: 1400px;
  height: 450px;
  overflow: hidden;
}

.sat-image {
  position: relative;
  width: 655px;
  height: 358px;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
  cursor: grab;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
  /* déjà présent sans faille : */
  will-change: transform, opacity;
  /* et ajoute : */
  backface-visibility: hidden;
  transform-style: preserve-3d;

  /* Cross-fade & GPU compositing */
  will-change: opacity, transform;
  transition: opacity 0.2s ease-in-out;
  transform: translateZ(0);
  image-rendering: crisp-edges;
}
.sat-image:active {
  cursor: grabbing;
}

/* ─── Timestamp sous l’image ───────────────────────────── */
.timestamp {
  font-size: 0.9em;
  color: #aaa;
}

/* ─── Contrôles & layout ───────────────────────────────── */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.controls button {
  background: #333;
  color: #eee;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.controls button:hover {
  background: #555;
}

.control-timestamp {
  font-size: 0.9em;
  color: #ccc;
  min-width: 140px;
  text-align: center;
}

/* ─── Zoom + / − ────────────────────────────────────────── */
.zoom-btn {
  background: #444;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  margin: 0 4px;
  border-radius: 4px;
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
}
.zoom-btn:hover {
  background: #666;
}

/* ─── Pavé Flèches de Pan ───────────────────────────────── */
.pan-btns {
  display: inline-grid;
  grid-template-areas:
    ". up   ."
    "left . right"
    ". down .";
  grid-gap: 4px;
}
.pan-btn {
  background: #444;
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.pan-btn:hover {
  background: #666;
}
.pan-up    { grid-area: up; }
.pan-down  { grid-area: down; }
.pan-left  { grid-area: left; }
.pan-right { grid-area: right; }

/* ─── Loader ───────────────────────────────────────────── */
#satellite-loader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(17,17,17,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-family: sans-serif;
}

.spinner {
  border: 6px solid #ccc;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Footer ───────────────────────────────────────────── */
footer {
  padding: 10px;
  font-size: 0.75em;
  color: #888;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .image-block {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  figure,
  .sat-image {
    width: 500px;
    height: 360px;
    margin: 0 auto;
  }
  .image-block {
    padding: 10px;
  }
  .controls {
    flex-direction: column;
  }
  .controls button {
    width: 100%;
    padding: 12px 0;
    font-size: 1em;
  }
  .pan-btns {
  }
}

/* ─── Centrage image dans image-block ───────────────────────── */
.image-block figure {
  display: flex;
  justify-content: center;
  align-items: center;




