<div class="wrapper">
    <header>
        <h1><img alt="" src="/limesurvey/upload/surveys/969979/images/logo%20dpf%20site.png" style="width: 100px; height: 59px;" /></h1>
        <h1>Enregistrez votre réponse !</h1>
    </header>

    <section class="main-controls">
        <canvas class="visualizer" height="60px"></canvas>
        <div id="buttons">
            <button aria-pressed="false" class="record" role="button">Record</button>
            <button aria-pressed="false" class="pause" disabled="disabled" role="button">Pause</button>
            <button aria-pressed="false" class="stop" disabled="disabled" role="button">Stop</button>
        </div>
    </section>

    <section class="sound-clips"></section>
</div>

<style type="text/css">.wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-size: 2rem;
  text-align: center;
  font-weight: normal;
  padding: 0.5rem 0 0 0;
}

.main-controls {
  padding: 0.5rem 0;
}

canvas {
  display: block;
  margin-bottom: 0.5rem;
}

#buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#buttons button {
  font-size: 1rem;
  padding: 1rem;
  width: calc(50% - 0.25rem);
}

button {
  font-size: 1rem;
  background: #0088cc;
  text-align: center;
  color: white;
  border: none;
  transition: all 0.2s;
  padding: 0.5rem;
}

button:hover, button:focus {
  box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 1);
  background: #0ae;
}

button:active {
  box-shadow: inset 0px 0px 20px rgba(0,0,0,0.5);
  transform: translateY(2px);
}

button {
  margin-right: 10px; /* ajuster la valeur pour obtenir l'espacement désiré */
}

button:last-child {
  margin-right: 0; /* Aucune marge à droite pour le dernier bouton */
}


/* Make the clips use as much space as possible, and
 * also show a scrollbar when there are too many clips to show
 * in the available space */
.sound-clips {
  flex: 1;
  overflow: auto;
}

section, article {
  display: block;
}

.clip {
  padding-bottom: 1rem;
}

audio {
  width: 100%;
  display: block;
  margin: 1rem auto 0.5rem;
}

.clip p {
  display: inline-block;
  font-size: 1rem;
}

.clip button {
  font-size: 1rem;
  float: right;
}

button.delete {
  background: #f00;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

/* Checkbox hack to control information box display */

label {
  font-size: 3rem;
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 5;
  cursor: pointer;
  background-color: black;
  border-radius: 10px;
}

input[type=checkbox] {
   position: absolute;
   top: -100px;
}

aside {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: 0.3s all ease-out;
  background-color: #efefef;
  padding: 1rem;
}

aside p {
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

aside a {
  color: #666;
}

/* Toggled State of information box */
input[type=checkbox]:checked ~ aside {
  transform: translateX(0);
}

/* Cursor when clip name is clicked over */

.clip p {
  cursor: pointer;
}

/* Adjustments for wider screens */
@media all and (min-width: 800px) {
  /* Don't take all the space as readability is lost when line length
     goes past a certain size */
  .wrapper {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
  }
}
  
  /*  recording and Pause butons styles */
  .recording {
  background-color: red;
  /* Ajouter d'autres styles pour le bouton d'enregistrement en cours ici */
}

.paused {
  background-color: white;
  /* Ajouter d'autres styles pour le bouton de pause ici */
}

/* ajouter des styles pour les états hover et active de ces classes si nécessaire */
.recording:hover, .paused:hover {
  /* Styles pour l'état hover */
}

.recording:active, .paused:active {
  /* Styles pour l'état active */
}

</style>

<link href="https://transloadit.edgly.net/releases/uppy/v2.3.0/uppy.min.css" rel="stylesheet">
<script src="https://transloadit.edgly.net/releases/uppy/v2.3.0/uppy.min.js"></script>
<script src="https://transloadit.edgly.net/releases/uppy/transloadit/v4.0.0/uppy.transloadit.min.js"></script>