/* Style général */
*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(120deg, #6a11cb, #2575fc);
    animation: gradientAnimation 3s infinite; /* Animation fluide */
     
  }
  @keyframes gradientAnimation {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  .number-container {
    display: inline-block;
    overflow: hidden;
    height: 1em; /* Ajustez selon la taille de votre texte */
    width: 2ch;
    line-height: 1em;
    vertical-align: middle;
  }
  
  .number-container span {
    
    display: inline-block;
    animation: slideIn 0.5s ease-out forwards;
    transform: translateY(100%);
  }
  
  @keyframes slideIn {
    from {
      transform: translateY(-100%);
    }
    to {
      transform: translateY(0%);
    }
  }
  
  #dynamic-number{
    color: red;
    
  }
  /* Conteneur principal */
  .container {
    
    margin-top: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    
  }
  
  /* Titre */
  h1 {
    font-size: 2em;
    margin-bottom: 10px;
  }
  
  /* Texte descriptif */
  p {
    font-size: 1.2em;
    margin-bottom: 20px;
  }
  /*input image*/
  /* Style de base pour masquer le bouton de l'input */
input[type="file"] {
  display: none; /* Masque l'input original */
}

/* Conteneur pour le bouton personnalisé */
.upload-label {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4CAF50; /* Vert */
  color: rgb(0, 0, 0);
  font-size: 16px;
  font-weight: bold;
  border: 2px solid #4CAF50;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

/* Effet hover */
.upload-label:hover {
  background-color: white;
  color: #4CAF50;
}

/* Effet actif */
.upload-label:active {
  background-color: #45a049;
  border-color: #45a049;
  transform: scale(0.98);
}

  /**/
  /* Boutons et input */
  .upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  input[type="file"] {
    font-size: 1em;
    padding: 5px;
    
  }
  
  button {
    background-color: #2575fc;
    color: #000000;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }
  
  button:hover {
    background-color: #6a11cb;
  }
  
  /* Liens de téléchargement */
  #downloads a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    display: block;
    margin-top: 10px;
  }
  
  #downloads a:hover {
    text-decoration: underline;
  }
  
.container {
    font-family: Arial, sans-serif;
     
    
    margin: 0 auto;
    text-align: center;
    justify-content: center;
  }
  .containerpreviews{
    margin: 0 auto;
     width:auto ;
  }
  .upload-container {
    margin-bottom: 20px;
  }
  
  .pdf-options {
    margin-top: 10px;
  }
  
  #previews {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    cursor: ew-resize;
    margin:  0 auto;
    /* display: grid; */
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    /* grid-template-columns: 1fr 2fr; */
  }
  
  .preview {
    margin: 0 auto;
    border: 1px solid #ccc;
    width: 200px;
    height: 200px;
    display: flex;
    
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  
  .preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  /*decoupe*/
  /* Overlay de chargement */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none; /* Masqué par défaut */
  flex-direction: column;
  color: white;
  font-family: Arial, sans-serif;
}


/* Spinner */
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

/* Animation de rotation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Texte sous le spinner */
.loading-overlay p {
  font-size: 18px;
  margin: 0;
}
/* decoupe */

.cut-options {
  margin: 10px 0;
}

.cut-options label {
  margin-right: 10px;
  font-weight: bold;
}

.cut-options select {
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}



.pdf-options {
  margin: 10px 0;
}

.pdf-options label {
  margin-right: 10px;
  font-weight: bold;
}

.pdf-options select {
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}






button#download-all-parts {
  background-color: #28a745;
  color: rgb(0, 0, 0);
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

button#download-all-parts:hover {
  background-color: #218838;
}


















#previews-container {
  display: flex;
  position: relative;
  min-width: 300px;
  max-width: 100%;
  width: 250px; /* Valeur par défaut */
  border: 1px solid #5a49b0e5;
}

#previews {
  flex: 1;
  
  padding: 10px;
  overflow: auto;
}

#resizer {
  width: 10px;
  cursor: ew-resize; /* Curseur horizontal */
  background-color: #ddddddf4;
}




/* Bouton fixe */
#fullscreen-btn {
  
  top: 10px; /* Décalage depuis le haut */
  left: 10px;/* Décalage depuis la droite */
  background-color: #007BFF; /* Bleu */
  border: none;
  border-radius: 50%; /* Bouton rond */
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
}

/* Changement de couleur au survol */
#fullscreen-btn:hover {
  background-color: #0056b3;
  transform: scale(1.2); /* Agrandit légèrement au survol */
}

/* Icône : carré blanc */
#fullscreen-btn::before {
  content: ''; /* Élément vide pour le logo */
  display: block;
  width: 30px; /* Taille du carré */
  height: 10px;
  background-color: white; /* Couleur du carré */
  box-sizing: border-box;
}

footer{
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 10px;
  color: white;
  font-family: Arial, sans-serif;
  gap: 10px;
}