:root { --bar-height: 1.5cm; }


body,html {
  font-family: Helvetica, Arial, sans-serif;
  width: 100% ;
  height: 100% ;
  margin: 0 ;
}

h2 {
  font-size:1em  ;
  padding-bottom: 0.1em ;
  margin-bottom: 0.5em;
}


h3 {
  font-size:0.8em ;
  padding-bottom: 0.1em ;
  margin-bottom: 0.5em;
}

.button {
  /* background-color: #c96800; */
  background-color: #6B3DAB;
  
  /* background-color: #4CAF50; */
  font-family:Calibri;
  font-weight: normal;
  /* font-family: 'Manrope', sans-serif; */
  border: none;
  color: white;
  padding: 3px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 0 0;
  cursor: pointer;
}

.button:disabled{
  opacity: 20%;
  cursor: default;
}

.button[hidden] {
  display: none;
}

.button.cancel{
  background-color: whitesmoke;
  color: black;
}




/* Réglages du header */
#header
{
  margin: 0;
  /* background: #6B3DAB; */
  /* background: #6B3DAB; */
  background-color: #170D25;
  /* color: #170D25; */
  color: white ;
  height : var(--bar-height);
  width: 100% ;
  box-sizing: border-box;
  position : absolute;
  top: 0 ;
  left:0 ;

  display : flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;

  text-align: center;
  padding: 5px;  
  font-family: Calibri;
}

.header-item{
 flex: 1;
 display: flex;
 align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-left .infos {
  margin: 0 0.5em;
}

.header-right {
  justify-content: flex-end;
}

.header-top {
  position: relative;   /* obligatoire : z-index ignoré sans position */
  z-index: 50;
}


#menu-opener {
  /* color: #818181; */
  position: relative;
  color: white;
  display : flex;
  flex-direction: row;
  /* justify-content: space-between; */
  align-items: center;
  z-index: 20;
}

.menu-opener-item {
  margin: 0.5em;
  top: 50%;
}

/* Listes déroulantes du menu : style natif retiré (appearance), flèche redessinée en SVG,
   texte trop long coupé par une ellipse */
.custom-select {
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  margin: 4px 0 0;
  padding: 5px 30px 5px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #e6e0f0;
  background-color: #241638;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b9a3e0' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid #4a2d75;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.custom-select:hover { border-color: #6B3DAB; }
.custom-select:focus-visible { outline: 2px solid #6B3DAB; outline-offset: 1px; }
.custom-select option { background-color: #170D25; color: #e6e0f0; }


/* Réglages de la barre de contrôles */
.sidebar 
{
  top: var(--bar-height); 
  bottom: var(--bar-height); 
  height: auto; 
  width: 8cm; /* 0 width - change this with JavaScript */
  position: fixed; /* Stay in place */
  left: 0;
  /* background-color: #111; Black */
  background-color: #170D25;
  overflow-x: hidden; /* Disable horizontal scroll */
  overflow-y: auto; 
  transition: transform 0.5s; /* 0.5 second transition effect to slide in the sidenav */
  color: #c9c2d6;
  font-size: 14px;
}

.sidebar.closed { transform: translateX(-100%); }

/* Sections du menu : espacement régulier entre les éléments (gap) au lieu de <br>,
   séparées par un trait fin */
.sidebar-sec {
  padding: 18px 15px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-sec + .sidebar-sec { border-top: 1px solid #2e1f47; }

.sidebar h2 {
  margin: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b9a3e0;
}

/* Largeur fixe : le bouton ne change pas de taille entre "Hide Sprites" et "Show Sprites" */
#hideSprites { align-self: flex-start; width: 128px; }


.closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 2em;
  margin-left: 50px;
  display: block;
  padding: none ;
  text-decoration: none;
  color: #818181;
  transition: 0.3s;
  z-index: 30;
}

.closebtn:hover
{
  color: #f1f1f1;
}

.selPlaceOverlay {
  position: fixed;
  width:100%;
  height:80vh;
  padding-top: 10vh;
  padding-bottom:10vh;
  top: 0;
  left: 0;
  /* background-color: rgba(0,0,0,1); */
  background-color: #170D25;
  z-index: 40;
  transition: transform 1s ease-in-out; /* 0.5 second transition effect to slide in the sidenav */

  /* flex: 1; */
	display: grid;
  grid-template-columns: repeat(4, 20%);
	gap: 10px; 
  justify-content: space-evenly;
  align-items: center;
}

.selPlaceOverlay.closed { transform: translateY(-100%); }

.selPlaceOverlay placeElmt {
  position: relative;
  width: 100%;
  height: 100%; /* Full height */
  display: flex; /* Allows control over child elements */
  justify-content: center; /* Centers the image horizontally */
  align-items: center; /* Centers the image vertically */
  /* padding: 3px; */
  overflow: hidden;

}

.selPlaceOverlay placeElmt img {
  width: 100%; /* Make image fill the grid cell */
  height: 100%;
  object-fit: cover; /* Crop image to fill the space without distortion */
  border-radius: 8px;
  margin:0;
}

.selPlaceOverlay placeElmt p {
  position: absolute; /* Positions text over the image */
  top:0;
  left:0;
  width: 100%;
  height: 100%; /* Full height */
  display: flex; /* Allows control over child elements */
  justify-content: center; /* Centers the image horizontally */
  align-items: center; /* Centers the image vertically */
  margin:0;
  color: white;
  text-align: center;
  /* background-color: rgba(0,0,0,0.5); */

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s , visibility 0.3s;
}

.selPlaceOverlay placeElmt:hover p {
  cursor: pointer;
  opacity: 1;
  visibility: visible;
}


/* Réglages du selecteur d'extrait sonore */
.icon-selector {
  display : flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.src-button {
  width: 46px;
  height: 46px;
  stroke: grey; /* default color */
}

.src-button:hover {
  /* stroke: orange; */
  stroke: #6B3DAB;
  color: #6B3DAB;
  cursor: pointer;
}

.highlighted{
  stroke: #6B3DAB ;
  color: #6B3DAB;
}


/* Boutons de source et d'éclairage : l'icône (mask-image, définie en JS) découpe le fond, qui donne la couleur */
#source-sel .src-button,
#light-sel .src-button {
  background-color: grey;
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}

#source-sel .src-button:hover,
#source-sel .highlighted,
#light-sel .src-button:hover,
#light-sel .highlighted {
  background-color: #6B3DAB;
}

#source-browse {
  display : flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
}

/* min-width: 0 : sans lui, un élément flex ne rétrécit pas sous la largeur de son texte et déborde du menu */
#source-browse .custom-select { flex: 1; min-width: 0; margin: 0; }

#play-pause-container {
  display: flex;
  /* flex-direction: row; */
  justify-content: center;
}

.button.play, .button.stop {
  margin-left: 5px;
}



/* Réglages du mixeur : une ligne par piste (nom, curseur, valeur, bouton mute) */
.mixer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slice {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slice.name {
  margin: 0;
  padding: 0;
  width: 64px;
  flex: none;
  font-size: 13px;
  font-weight: normal;
}

/* min-width: 0 pour que le curseur puisse rétrécir au lieu de pousser le bouton hors du menu */
.slice.controls {
  flex: 1;
  min-width: 0;
  gap: 6px;
}

/* Largeur fixe : le bouton ne change pas de taille entre "Mute" et "Unmute" */
.mute {
  padding: 3px 8px;
  width: 76px;
  flex: none;
}

.controls.value {
  min-width: 28px;
  font-size: 12px;
}

.controls.slider {
  flex: 1;
  min-width: 0;
  accent-color: #6B3DAB;
}

/* .title-sesames{
  position : absolute;
  margin-top: 2px;
  right: 65px;
  width: 42px;
  height: 42px;
}

.title-sesames-infos{
  position : absolute;
  margin-top: 30px;
  right: 88px;
  width: 100px;
  height: 42px;
} */

#footer
{
  margin: 0;
  background-color: #170D25;
  height : var(--bar-height);
  width: 100% ;
  box-sizing: border-box;
  position : absolute;
  bottom: 0 ;
  left:0 ;

  display : flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;

  color : white;
  text-align: center;
  padding: 0 5px;  /* pas de marge verticale : le logo occupe toute la hauteur */
}

.footer-item
{
  font-size: 18pt;

}

.footer-smallitem
{
  font-size: 11pt;
  text-align: right;
  align-self: stretch;
}

.footer-side
{
  flex: 1;
}

.logosHolder {
  margin-top: 0px;
  margin-left: 5px;
  margin-right: 5px;
  vertical-align: middle;
  border: 0px solid black;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.logosHolder img {
  height: 50%;
}

.logosHolder a
{
padding: 0px 0px 0px 0px;
text-decoration: none;
font-size: 12px;
color: #818181;
}


.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Styles for the modal content */
.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 500px;
  text-align: center;
}

.modal-content p
{
  text-align: justify;
}


#loading {
  display:none;
  position: absolute ;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: none ;
  color: white;
  font-size: 30pt
}



/* style de la croix pour réglage de l'orientation des panos */
  #cross {
    opacity: 0;
  }
  
  .vl {
    background-color: red;
    height: 100%;
      left: 50%;
      top : 50%;
      position: absolute ;
      transform: translateY(-50%);
      width: 1px;
  }
  
  .hl {
    background-color: red;
    position: absolute;
      height: 1px;
      left: 50%;
      top : 50%;
      transform: translateX(-50%);
      width: 100%;
  }
  