  body { background:#111; color:#eee; font-family:sans-serif; margin:0; padding:0rem 1rem 1rem 1rem; 
  max-width:1500px; margin:auto;overscroll-behavior: none; }
 
  label, button { cursor:pointer; }
  
 a {
  color: #ffff66;           /* jaune doux lisible */
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffffff;           /* blanc au survol */
  text-decoration: underline;
}
.y_txt{
 color: #ffff66; 
}
.response{
font-size:0.8em;
}
.hidden {
  display: none !important;
}
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #222;
  padding: 1em 2em;
  border-radius: 10px;
  text-align: center;
  color: white;
  box-shadow: 0 0 10px #000;
}
.modal-content button {
  margin: 0.5em;
  padding: 0.5em 1em;
  background: #444;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 5px;
}
.modal-content button:hover {
  background: #666;
}


  #grid {
  margin-top: 0.5rem;
   margin-bottom: 0.5rem;
  /*max-height: 500px;*/
  overflow-y: auto;
  overflow-x: auto; /* Ajout scroll horizontal */
  white-space: nowrap; /* empêcher le retour à la ligne */
}
.sample-row {
  display: flex;
  flex-wrap: nowrap; /* empêcher le retour à la ligne */
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.2rem;
  margin-left: 0.5rem;
}
.sample-label {
  width: 140px;       /* Ajuste la largeur max selon ton besoin */
  display: inline-block;  /* Nécessaire pour text-overflow */
  cursor: pointer;
  position: relative;
}
.sample-name {
  width: 45px;       /* Ajuste largeur max selon besoin */
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  user-select: text;      /* Pour permettre la sélection du texte */
  font-size:0.7em;
  text-decoration:underline;
  color:#ffff00;
}
.sample-name:hover {
   color:#ffffff;
  
}



.btn-primary {
  background-color: #007bff;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  
  
}

.btn-primary:hover {
  background-color: #0056b3;
}
.step {
  width: 30px;
  height: 30px;
  background: #222;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
  user-select: none;
  flex-shrink: 0; /* empêcher rétrécissement */
}
  
  
  .step.active { background:limegreen; color:#000; }
  .step.muted { opacity:0.4; }
  
/* Valeurs par défaut */
.step {
  width: 30px;
  height: 30px;
  margin: 2px;
}

/* Mode 64 steps : un peu plus petit */
.mode-64 .step {
  width: 24px;
  height: 24px;
  margin: 1.5px;
}

/* Mode 128 steps : encore plus petit */
.mode-128 .step {
  width: 18px;
  height: 18px;
  margin: 1px;
} 

.play-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  background: rgba(255, 255, 0, 0.3);
  pointer-events: none;
  transition: left 0.1s linear;
  z-index: 10;
}
 .mode-64 .play-cursor {
  width: 24px;
  height: 24px;
}

/* mode 128 = encore plus petit */
.mode-128 .play-cursor {
  width: 18px;
  height: 18px;
} 

.mode-64 .play-cursor {
  width: 24px;
  height: 24px;
}

.mode-128 .play-cursor {
  width: 18px;
  height: 18px;
}
  
  
  #timer { font-weight:bold; font-size:1.2rem; margin-left:1rem; min-width:60px; }
  audio { width: 100%; margin-top: 1rem; outline:none; }
  input[type=number] { width: 60px; }
  
.sample-row {
  position: relative; /* nécessaire pour positionner le curseur en absolu */
  display: flex;
  align-items: center;
  gap: 0.3rem; /* 0.3rem = environ 4.8px */
  margin-bottom: 0.2rem;
}


/* Conteneurs généraux */
.controls { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; margin-bottom:1rem; }
.controls,
.json-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

/* Boutons standards */
.controls button,
.json-controls button,
#uploadSampleBtn,
#addSampleBtn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  user-select: none;
  font-size: 0.95rem;
}

.controls button:hover,
.json-controls button:hover,
#uploadSampleBtn:hover,
#addSampleBtn:hover {
  background-color: #0056b3;
}

/* Icônes dans les boutons */
.controls button i,
.json-controls button i,
#uploadSampleBtn i {
  font-size: 1.1em;
}

/* Sélecteurs et champs texte/numériques */
.controls select,
.controls input[type="number"],
#sampleKit,
#sampleSelect,
#styleSelect,#options_grid {
  padding: 0.35rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  background-color: #f8f9fa;
  color: #333;
  transition: border-color 0.3s ease;
}

.controls select:focus,
.controls input[type="number"]:focus,
#sampleKit:focus,
#sampleSelect:focus,
#options_grid:focus,
#styleSelect:focus {
  outline: none;
  border-color: #007bff;
}

/* Label */
.controls label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.controls-section > .controls {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}


/* File input caché */
input[type="file"]#uploadSample,
input[type="file"]#importJSONFile {
  display: none;
}

.play-sample-btn {
  background: linear-gradient(to right, #007bff, #00c6ff);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background-color 0.3s ease;
  user-select: none;
  font-size: 0.95rem;
}

.play-sample-btn:hover {
  background: linear-gradient(to right, #0056b3, #0096ff);
}

.play-sample-btn i {
  font-size: 1.1em;
}
/* CSS à ajouter */
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: 6px;
  font-size: 16px;
  color: #444;
  transition: color 0.3s ease;
}
.btn-icon:hover {
  color: #007bff;
}
.mute-btn:hover {
  color: #e63946; /* rouge mute */
}
.delete-btn:hover {
  color: #dc3545; /* rouge delete */
}
/* Conteneur des sauvegardes */


/* Chaque ligne sauvegarde */
.localSaves
{
max-height:200px;overflow:auto;
}

#localSavesContainer > div {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  align-items: center;
}

#localSavesContainer > div button:first-child {
  flex-grow: 1;          /* prend tout l'espace restant */
  width: auto;           /* ignore width fixe */
  box-sizing: border-box;
  text-align: left;
  padding: 6px 12px;
  background-color: #ffffff;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.25s ease;
}

#localSavesContainer > div button:last-child {
  flex-shrink: 0;        /* ne rétrécit pas */
  flex-basis: 100px;     /* largeur de base 100px */
  max-width: 100px;      /* largeur max 100px */
  width: 100px;          /* largeur fixe 100px */
  box-sizing: border-box;
  padding: 6px 10px;
  background-color: #e76f51;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  transition: background-color 0.25s ease;
}

#localSavesContainer > div button:last-child:hover {
  background-color: #c94e36;
}

/* Icone poubelle */
/*#localSavesContainer button:last-child::before {
  font-family: "Font Awesome 5 Free"; 
  content: "\f2ed";
  font-weight: 900;
  margin-right: 4px;
}*/









h1 {
  font-size: 1.2em;
  color: #fff;
  display: flex;
  align-items: center;
  margin:0.5em 0 0.2em 0;
}



h1 i {
	margin:0em 0.2em 0 0;
  color: #00d1b2;
}

/* Affichage boutons primary */
button,
#uploadSampleBtn,
#addSampleBtn {
  background: linear-gradient(to right, #007bff, #00c6ff);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: transform 0.2s ease, background 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

button:hover,
#uploadSampleBtn:hover,
#addSampleBtn:hover {
  background: linear-gradient(to right, #0056b3, #0096ff);
  transform: translateY(-1px);
}

/* Select & input styling */
select,
input[type="number"] {
  background-color: #222;
  color: #eee;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
}

select:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #00c6ff;
  box-shadow: 0 0 0 2px rgba(0,198,255,0.3);
}

/* Sample limit */
.sample-limit-warning {
  color: #ff4444;
  font-weight: bold;
  text-align: center;
  background: #330000;
  padding: 0.5rem;
  margin-top: 1rem;
  border-radius: 6px;
  display: none;
}



.controls-section,
.json-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;

  padding: 1rem 0.8rem;
  background-color: #2c2f33; /* gris foncé doux, style moderne */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); /* ombre plus sombre */
  color: #ddd; /* texte clair pour contraste */
}

.dino_i {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;

  padding: 1.2rem 1rem;
  background-color: #2c2f33;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);

  color: #ddd;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.015em;
  text-align: justify;
  user-select: text;
  word-break: break-word;
}

/* Paragraphes plus serrés */
.dino_i p {
  margin: 0 0 0.6rem 0;
}
.dino_i p:last-child {
  margin-bottom: 0;
}


.output-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 0.8rem;
  background-color: #2c2f33;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  color: #ddd;
  /*max-width: 1500px; */ /* même max-width que body */
  margin: 1rem auto;  /* centrage horizontal et marges verticales */
  box-sizing: border-box; /* inclure padding dans largeur */
}

.output-section .player-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}
.player-row
{
display:none !important;
}
.output-section .player-label {
  font-size: 0.9rem;
  color: #ddd;
  white-space: nowrap;
}

/*.toggle-btn {
  display: none;
}*/


/*.close-btn{
display:none;
font-size: 1.2rem;
  background: linear-gradient(to right, #007bff, #00c6ff);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  transition: transform 0.2s ease, background 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.close-btn:hover{
  background: linear-gradient(to right, #0056b3, #0096ff);
  transform: translateY(-1px);
}*/

/*.toggle-group {
  width: 100%;
  overflow: hidden;  
  margin-bottom: 0;
}*/
.footer{
margin:10em 0 0 0;
}
.footer p{
width:100%;
margin:0 auto 0 auto;
text-align:center !important;
}

 .on_off{
font-size:0.7em;
  } 

.piano-roll-modal button{
max-width:60px;
}
.piano-roll-btn {
  background: transparent;
  border: 1px solid #999;
  color: #999;
  margin-left: 5px;
  width: 20px;
  height: 20px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  font-size: 13px;
  padding: 0;
}


.piano-roll-btn.active {
  background-color: #0a5;
  color: white;
  border-radius: 3px;
  box-shadow: 0 0 6px #0f0;
}


.sample-row.piano-roll-active {
  background-color: #1f1f1f;
}

/*piano roll*/
#piano-roll-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  max-height: 80vh;
}

.piano-roll-row {
  display: flex;
  align-items: center;
}

.note-label {
  color: white;
  width: 3em;
  text-align: right;
  margin-right: 4px;
  font-size: 12px;
}

.piano-cell {
  width: 20px;
  height: 20px;
  margin: 1px;
  background: #333;
  cursor: pointer;
}


#loopButtons {


  display: flex;
  flex-direction: column;
  gap: 0.4rem;  
  padding: 1rem 0.8rem;
  background-color: #2c2f33 !important; /* gris foncé doux, style moderne */
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7); /* ombre plus sombre */
  color: #ddd; /* texte clair pour contraste */
  
  
  color: white;
  border: none;
  
  
  
}

#loopButtons_1 input {
  width: 100%;
  box-sizing: border-box;
}
#loopButtons_2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}



@media (min-width: 1024px) {
  .sample-label {
    width: 160px;
    border: 0px solid #00ff00;
  }
  .sample-name {
    width: 60px;  
  }
}

@media (min-width: 1600px) {
  .sample-label {
    width: 200px;
    border: 0px solid #ffff00;
  }
  .sample-name {
    width: 90px;  
  }
}


@media (max-width: 768px) {

.btn-text{
display:none;
}

 .json-controls {
    display: block;  
  }
#ctl_bt3 button{
    float: left; /* Pour les aligner les uns à côté des autres */
    width: 60px;
    padding: 0.5em;
    margin-right: 8px; /* petit espace entre les boutons */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em; /* taille d’icône */
}
.clr{
clear:both;
}
 

	.no768
		{
	 display: none !important;
	}
  .controls,
  .json-controls,
  .controls-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  
  .controls input[type="number"],.json-controls,
.controls select,.json-controls button,
.controls-section select,
.controls-section button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


/*
  button,
  select,
  input[type="number"] {
    width: 100%;
    font-size: 1rem;
  }*/
  
  .on_off{
  width:60px !important;
  } 
 
  #sampleKit,
  #sampleSelect,
  #styleSelect,#options_grid {
    width: 100%;
  }

  #sampleLimitMsg {
    font-size: 0.95rem;
  }

  .controls-section {
    padding: 0.5rem 0.8rem 1rem 0.8rem;
  }

  .step {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  
  .sample-name {
    font-size: 0.65em;
  }
 
  


  #localSavesContainer > div {
    /* Reste flex, mais on force le wrap */
    flex-wrap: wrap;
  }
  #localSavesContainer button:first-child {
    width: 50%;
  }
  #localSavesContainer button:last-child {
    width: 100%;
    float: none; /* au cas où */
    margin-top: 0.3rem;
  }
  
  
}
@media (max-width: 600px) {
  .controls,
  .controls-section,
  .json-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .controls input[type="number"],
  .controls select,
  .controls-section select,
  .controls-section button,
  .json-controls button {
    width: 100%;
  }
}  





@media (max-width: 470px) {
 #ctl_bt3 button{
 

   
    float: left; /* Pour les aligner les uns à côté des autres */
    width: 50px;
    padding: 0.3em;
    margin-right: 6px; /* petit espace entre les boutons */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em; /* taille d’icône */
   


}

   
} 




