
/* === Composants spécifiques à PanoSplitter === */

/* Centrage principal */
main.panosplit {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Zone de dépôt */
.upload-area {
  background-color: #1c1c1c;
  border: 2px dashed #444;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.file-input-label {
  display: inline-block;
  background-color: #333;
  color: #eee;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}
.file-input-label:hover {
  background-color: #444;
}

.support-text {
  font-size: 0.85rem;
  color: #888;
}

/* Messages d'erreur */
.error-message {
  background-color: #b71c1c;
  color: white;
  border-radius: 4px;
  padding: 1rem;
  margin: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#error-message p {
  margin: 0;
}

/* Prévisualisation */
.preview-container,
.result-container {
  background-color: #1a1a1a;
  border-radius: 6px;
  padding: 1.5rem;
  margin-top: 2rem;
}

#preview-img {
  max-width: 100%;
  margin: 1rem 0;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.preview-info {
  margin-top: 1rem;
}

#image-details p,
.toggle-description {
  font-size: 0.9rem;
  color: #ccc;
}

/* Boutons */
button,
.primary-btn,
.secondary-btn,
#download-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin: 0.5rem 0.5rem 0.5rem 0;
  transition: background-color 0.3s ease;
}

.primary-btn,
#process-btn,
#download-btn {
  background-color: #1e88e5;
  color: white;
}
.primary-btn:hover,
#process-btn:hover,
#download-btn:hover {
  background-color: #1565c0;
}

.secondary-btn,
#reset-btn,
#dismiss-error {
  background-color: #333;
  color: #eee;
}
.secondary-btn:hover,
#reset-btn:hover,
#dismiss-error:hover {
  background-color: #444;
}

/* Aperçu des tranches */
.slices-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}
.slices-preview img {
  max-width: 120px;
  border: 1px solid #333;
  border-radius: 4px;
}

/* Overlay de chargement */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 18, 18, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.loading-content {
  color: white;
  font-size: 1.3rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #888;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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



/* === Mise en page harmonisée avec Isoforty + structure pano.futc.de === */

/* Centrage et largeur max */
main.panosplit {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Zone de drop/upload */
.upload-area {
  background-color: #1c1c1c;
  border: 2px dashed #444;
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  transition: border-color 0.3s ease;
}
.upload-area:hover {
  border-color: #666;
}
.file-input-label {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: #333;
  color: #eee;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.file-input-label:hover {
  background-color: #444;
}

/* Messages d'erreur */
.error-message {
  background-color: #b71c1c;
  color: white;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#error-message p {
  margin: 0;
}

/* Prévisualisation - structure en 2 colonnes */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.preview-img-wrapper img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.preview-meta .info p {
  margin-bottom: 0.4rem;
}
.preview-meta label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem 0;
}
.preview-meta .actions {
  margin-top: 1rem;
}
.preview-meta .actions button {
  margin-right: 0.5rem;
}

/* Résultat */
#result-container {
  margin-top: 3rem;
}
#slices-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#slices-preview img {
  max-width: 120px;
  border-radius: 4px;
  border: 1px solid #444;
}
#download-btn {
  margin-top: 1rem;
}

/* Overlay de chargement */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(18, 18, 18, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.loading-content {
  color: white;
  font-size: 1.2rem;
}
