/* Structure générale */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* évite le débordement du flou */
}

/* Calque de fond flouté */
.site-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px);
  transform: scale(1.05); /* masque les bords visibles du flou */
  will-change: filter, transform;
  z-index: 0; /* derrière le contenu */
}

/* Contenu au-dessus du fond flouté */
.pupitre-container {
  position: relative;
  z-index: 1; /* au-dessus du fond */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 2rem;
  background-color: rgba(0, 0, 0, 0.6); /* assombrit pour lisibilité */
  color: #fff;
  box-sizing: border-box;
}

/* Header : titre centré + bouton retour à droite */
.pupitre-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 1.5rem;
  width: 100%;
}

.pupitre-titre {
  font-size: 1.4rem;
  text-align: center;
  margin: 0;
  flex: 1;
}

.btn-retour {
  position: absolute;
  right: 0;
  background: #0073aa;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
}

.btn-retour:hover {
  background: #005f8d;
}

/* Waveform */
.pupitre-waveform {
  position: relative;
  background: #222;
  border-radius: 6px;
  padding: 1rem;
  width: 90%;
  margin: 0 auto 1.5rem auto;
}

/* Repères desktop (sous waveform) */
.pupitre-reperes-desktop {
  position: relative;
  width: 90%;
  margin: 1rem auto;
  height: 3rem; /* espace pour les boutons */
}

.repere-btn-desktop {
  position: absolute;
  bottom: 0;
  background: #f0f0f0;
  border: 1px solid #000;
  color: #333;
  font-size: 1rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.repere-btn-desktop:hover {
  background: #e0e0e0;
  color: #000;
}

/* Contrôles */
.pupitre-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 20px;
  background: #f0f0f0;
  padding: 1rem;
  border-radius: 6px;
}

.btn-play,
.btn-stop {
  background: #333;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-play svg,
.btn-stop svg {
  fill: #fff;
  width: 70%;
  height: 70%;
}

.btn-play:hover,
.btn-stop:hover {
  background: #555;
}

.time-display {
  font-size: 1rem;
  color: #333;
}

/* Repères mobile (sous le panel control) */
.pupitre-reperes-mobile {
  display: none; /* cachés par défaut */
}

/* Responsive tablette et smartphone */
@media (max-width: 1024px) {
  /* Masquer la waveform et les repères desktop */
  .pupitre-waveform,
  .pupitre-reperes-desktop {
    display: none;
  }

  /* Contrôles sous le titre */
  .pupitre-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .pupitre-controls {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    padding: 0.5rem;       /* 👉 réduit les marges intérieures */
    gap: 1rem;             /* 👉 espace plus compact */
  }

  .btn-play,
  .btn-stop {
    width: 32px;           /* 👉 boutons plus petits */
    height: 32px;
  }

  /* Repères mobile visibles en colonne */
  .pupitre-reperes-mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin: 1rem 5px;
  }

  .repere-btn-mobile {
    width: calc(100% - 10px); /* largeur totale moins 5px de chaque côté */
    background: #f0f0f0;
    border: 1px solid #000;
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    padding: 8px;            /* 👉 padding réduit */
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
    margin-left: 5px;
    margin-right: 5px;
  }

  .repere-btn-mobile:hover {
    background: #e0e0e0;
    color: #000;
  }
}

/* Responsive smartphone uniquement */
@media (max-width: 767px) {
  /* Header : bouton retour au-dessus du titre */
  .pupitre-header {
    display: flex !important;
    flex-direction: column !important; /* empile retour + titre */
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .pupitre-header .btn-retour {
    position: static !important;   /* supprime le positionnement absolu */
    right: auto !important;
    top: auto !important;
    margin-bottom: 0.5rem !important;
    order: -1 !important;          /* force le bouton à apparaître avant le titre */
  }

  .pupitre-header .pupitre-titre {
    font-size: 1rem !important;    /* 👉 titre encore plus réduit sur smartphone */
    text-align: center !important;
  }

  /* Réduction de la taille des labels des boutons repères */
  .repere-btn-mobile {
    font-size: 0.85rem !important; /* 👉 police plus petite */
    padding: 6px !important;       /* 👉 padding compact */
  }

  /* Si jamais les boutons desktop apparaissent encore, on réduit aussi */
  .repere-btn-desktop {
    font-size: 0.85rem !important;
    padding: 3px 6px !important;
  }
}