/* 🎯 Dropzone upload area */
.dropzone-container {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 30px;
}

.dropzone-label {
  background: #fff;
  border: 2px dashed #FF0060;
  border-radius: 10px;
  padding: 60px 40px;
  width: 600px;
  max-width: 90vw;
  text-align: center;
  color: #FF0060;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: 0.2s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.dropzone-label:hover {
  border-color: #d90450;
  box-shadow: 0 12px 24px rgba(255,0,96,0.10);
  background: #fdf6fa;
}

.dropzone-label i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #FF0060;
}

.dropzone-helper {
  font-size: 0.95rem;
  color: #999;
  margin-top: 10px;
}

/* 🧾 Fichier uploadé */
.file-upload {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto 30px auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem 40px; /* 1rem en haut/bas, 40px à gauche/droite */
  box-sizing: border-box;
}

/* Zone principale : nom, pages, actions */
.file-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-info .filename {
  font-weight: bold;
  color: #222;
}

.file-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 576px) {
  .file-actions {
    justify-content: center;
    flex-wrap: nowrap; /* ❗ pour que ça reste sur une seule ligne même en mobile */
    overflow-x: auto;
  }

  .file-actions > * {
    flex: 0 0 auto;
  }
}

.file-actions button {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: none;
  background: #f0f0f0;
  font-size: 1rem;
  cursor: pointer;
}

.file-actions button:hover {
  background: #ddd;
}

.file-actions input {
  width: 40px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* ✅ Zone preview affichée EN DESSOUS */
/* 📌 Container général */
.file-preview-container {
  margin-top: 20px;
  border-top: 1px dashed #ccc;
  padding-top: 20px;
  width: 11000px;
}

/* 🧾 Bloc contenu preview */
.file-preview-content {
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px 20px;
}

/* 🔵 Titre + bouton Fermer */
.file-preview-content .d-flex {
  justify-content: space-between;
  align-items: center;
}

/* ✅ Infos alignées à gauche */
.file-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

/* ✅ Centrer les boutons navigation et le canvas */
.pdf-preview-controls,
.pdf-canvas {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 🧭 Centrer le bloc de navigation */
.pdf-preview-controls {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* 🧾 Canvas */
.pdf-canvas {
  
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 10px;
}


/* Responsive */
@media (max-width: 768px) {
  .file-meta-grid {
    grid-template-columns: 1fr;
  }

  .file-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-actions {
    justify-content: flex-start;
  }
}

.pdf-visual-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.canvas-wrapper {
  max-width: 90vw;
  margin: 0 auto;
  text-align: center;
}

#pdf-canvas {
  border: 2px solid #4a64ff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  max-width: 100%;
}

.page-count {
  margin-top: 8px;
  font-size: 14px;
  color: #444;
}

.nav-button {
  width: 40px;
  height: 40px;
  background: #ff0060;
  color: white;
  font-weight: bold;
  font-size: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.file-info-box {
  border: 2px solid #777;
  border-radius: 4px;
  padding: 10px 14px;
  background-color: #fff;
  font-weight: 500;
  display: flex;
  align-items: center;
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
}
.file-meta-grid .col-md-6 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Réduction pour mobile */
@media (max-width: 576px) {
  .btn,
  .file-actions button,
  .nav-button,
  .close-btn {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
    min-width: auto !important;
    height: auto !important;
    border-radius: 6px !important;
  }

  .close-btn {
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
  }

  .nav-button {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 576px) {
  .file-actions button,
  .file-actions input {
    font-size: 0.75rem;
    padding: 4px 6px;
    min-width: 32px;
    height: 32px;
  }

  .file-actions input {
    width: 36px;
    text-align: center;
  }

  .close-preview {
    font-size: 0.8rem;
    padding: 6px 10px;
    min-width: 80px;
  }

  .prev-page,
  .next-page {
    font-size: 0.9rem;
    padding: 6px 10px;
    width: 38px;
    height: 38px;
  }

  .file-actions {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
  }
}

@media (max-width: 576px) {
  .file-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    padding: 6px;
    width: 36px;
    height: 36px;
  }

  .file-actions button i {
    font-size: 1rem;
    line-height: 1;
  }

  .file-actions input {
    width: 36px;
    height: 36px;
    text-align: center;
    font-size: 0.85rem;
  }

  .file-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
}

@media (max-width: 576px) {
  .apercu-text {
    display: none;
  }
}
