/* ---------------- */
/* css access mode  */
/* ---------------- */

/* global */

#btnSaveAllTabs.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0;
}
/* Badge flottant par défaut caché */
.readModeInfo {
  display: none;
  position: fixed;
  top: 200px;
  right: 50px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background-color: #f8d7da; /* rouge clair */
  color: #b00; /* rouge foncé */
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: default;
  user-select: none;
  transform-origin: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Affichage et animation quand le parent a readMode */
.readMode .readModeInfo {
  display: flex;
  animation: elegantPulse 1.5s ease-in-out infinite;
}

.editMode .readModeInfo {
  display: none;
  /* animation: elegantPulse 1.5s ease-in-out infinite; */
}

/* Animation subtile avec glow et pulsation */
@keyframes elegantPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(176,0,0,0.6); /* léger glow rouge */
    opacity: 1;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 1;
  }
}

.modal-footer.readMode 
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0;
}

/* tab2 */

.addImages.readMode,
.addDocuments.readMode,
.addProjects.readMode,
.addMembers.readMode,
.addPlatforms.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0;
}

.btnDeleteImage.readMode,
.btnDeleteDocument.readMode,
.btnDeleteProject.readMode,
.btnDeleteMember.readMode,
.btnDeletePlatform.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0;
}

#selectCheckboxMissionLocation.readMode,
#selectCheckboxAllMissionLocation.readMode,
#selectCheckboxMissionToolModuleCorer.readMode,
#selectCheckboxAllMissionToolModuleCorer.readMode,
#selectCheckboxMissionTool.readMode,
#selectCheckboxAllMissionTool.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

#isHeadOfMission.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.missionMemberRole.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

/* tab3 */

#btnModalViewActions.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0;
}

.cardButtonsSrc.readMode,
.cardButtonsSrm.readMode,
.cardButtonsMrc.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

#btnAddElementDatatableActionSrm.readMode,
#btnAddElementDatatableActionSrmInput.readMode,
#btnCloneElementDatatableActionSrm.readMode,
#btnCloneElementDatatableActionSrmInput.readMode,
#btnDeleteElementDatatableActionSrm.readMode,
#btnAddElementDatatableActionSrc.readMode,
#btnAddElementDatatableActionSrcInput.readMode,
#btnCloneElementDatatableActionSrc.readMode,
#btnCloneElementDatatableActionSrcInput.readMode,
#btnDeleteElementDatatableActionSrc.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0,5;
}


#selectCheckboxActionSrmAll.readMode,
#selectCheckboxActionSrcAll.readMode,
#selectCheckboxActionLevel2MrcAll.readMode,
#selectCheckboxActionLevel1MrcAll.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.checkboxActionSrm.readMode,
.checkboxActionSrc.readMode,
.checkboxActionLevel2Mrc.readMode,
.checkboxActionLevel1Mrc.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.buttonStatusSrm.readMode,
.buttonStatusSrc.readMode,
.buttonStatusLevel2Mrc.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.typeActionSRM.readMode input,
.typeActionSRM.readMode select,
.typeActionSRM.readMode textarea,
.typeActionSRM.readMode button,
.typeActionSRM.readMode a,
.typeActionSRM.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.typeActionSRC.readMode input,
.typeActionSRC.readMode select,
.typeActionSRC.readMode textarea,
.typeActionSRC.readMode button,
.typeActionSRC.readMode a,
.typeActionSRC.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.typeActionLevel1MRC.readMode input,
.typeActionLevel1MRC.readMode select,
.typeActionLevel1MRC.readMode textarea,
.typeActionLevel1MRC.readMode button,
.typeActionLevel1MRC.readMode a,
.typeActionLevel1MRC.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.typeActionLevel2MRC.readMode input,
.typeActionLevel2MRC.readMode select,
.typeActionLevel2MRC.readMode textarea,
.typeActionLevel2MRC.readMode button,
.typeActionLevel2MRC.readMode a,
.typeActionLevel2MRC.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

td.readMode
{
  pointer-events: none;    /* bloque toute interaction */
  touch-action: none;      /* bloque sur mobile */
  cursor: not-allowed;
  opacity: 0.75;
  background-color: #D1E7DD;
}

/* tab6 */

#selectCheckboxPrelevementCoringSrcAll.readMode,
#selectCheckboxPrelevementCoringSrmAll.readMode,
#selectCheckboxPrelevementCoringMrcAll.readMode,
#selectCheckboxVirtualPrelevementCoringMrcAll.readMode
{
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}

#divDatatableMissionPrelevementCoringSrc table.dataTable input[type="checkbox"],
#divDatatableMissionPrelevementCoringSrm table.dataTable input[type="checkbox"],
#divDatatableMissionPrelevementCoringMrc table.dataTable input[type="checkbox"],
#divDatatableMissionVirtualPrelevementCoringMrc table.dataTable input[type="checkbox"]
 {
  pointer-events: none;
  opacity: 0.5;       /* facultatif : effet visuel de désactivation */
  cursor: not-allowed; /* facultatif : curseur interdit */
}

/* tab4 */

/* TODO */

/* divers */

.readMode input,
.readMode select,
.readMode textarea,
.readMode button,
.readMode a {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #f0f7ff; /* bleu clair */
} 

/* ---------------- */
/* css onglet actif */
/* ---------------- */

.nav-item.nav-link.active
{
  background-color:#DCDCDC !important;
  border-color: black;
}

/* -------------------- */
/* css onglet desactivé */
/* -------------------- */

.nav-item.nav-link.disabled {
  pointer-events: auto;
  opacity: 0.5;
  cursor: not-allowed;
}

.disabled-tab::after {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  font-size: 12px;
  z-index: 1000;
}

.disabled-tab:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ---------------------------------- */
/* BOUTON SAUVEGARDE TOUS LES ONGLETS */
/* ---------------------------------- */

#btnSaveAllTabs {
  position: fixed;
  z-index: 999;
  top: 200px;
  right: 50px;
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 50%;
  background-color: rgb(230, 226, 226);
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Affichage et animation douce avec glow */
#btnSaveAllTabs.changeColor {
  display: flex;
  animation: elegantPulseBtn 1.5s ease-in-out infinite;
  background-color: red;
}

/* Animation pulsation + glow subtile */
@keyframes elegantPulseBtn {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(176, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(176, 0, 0, 0.6); /* glow rouge doux */
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(176, 0, 0, 0.3);
  }
}

/* État désactivé */
#btnSaveAllTabs.disabled {
  opacity: 1;
  cursor: not-allowed;
  background-color: rgb(230, 226, 226);
  box-shadow: none;
  animation: none; /* désactive l'animation si bouton désactivé */
}

/* -------------------- */
/* BOUTON AFFICHAGE MAP */
/* -------------------- */

#btnOpenMissionMap
{
  
  position: fixed;
  z-index: 999;
  top: 300px;
  right: 50px;
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 50%;
  background-color: rgb(167, 167, 231);  
  display: none;
  justify-content: center;
  align-items: center;
}

/* ------------------ */
/* BOUTON RELOAD PAGE */
/* ------------------ */

#btnReloadPage
{
  
  position: fixed;
  z-index: 999;
  top: 400px;
  right: 50px;
  width: 75px;
  height: 75px;
  border: none;
  border-radius: 50%;
  background-color: rgb(250, 176, 5);  
  display: none;
  justify-content: center;
  align-items: center;
}

/* ------------------------- */
/* BOUTON VALIDATION MISSION */
/* ------------------------- */

/* définition animation changement couleur du bouton */
@keyframes changeColorValidation {
  0% { background: linear-gradient(to right, rgb(60, 170, 120), rgb(40, 150, 100)); box-shadow: 0 0 5px rgba(25, 135, 84, 0.3); }
  25% { background: linear-gradient(to right, rgb(50, 160, 110), rgb(35, 145, 95)); box-shadow: 0 0 10px rgba(25, 135, 84, 0.4); }
  50% { background: linear-gradient(to right, rgb(40, 150, 100), rgb(30, 140, 90)); box-shadow: 0 0 15px rgba(25, 135, 84, 0.5); }
  75% { background: linear-gradient(to right, rgb(35, 145, 95), rgb(28, 138, 88)); box-shadow: 0 0 20px rgba(25, 135, 84, 0.6); }
  100% { background: linear-gradient(to right, rgb(25, 135, 84), rgb(25, 135, 84)); box-shadow: 0 0 25px rgba(25, 135, 84, 0.7); }
}

#btnValidationMission.changeColorValidation {
  animation: changeColorValidation 2s infinite; /* Animation de changement de couleur */
}

#btnValidationMission:disabled {
  pointer-events: auto;
  opacity: 0.15;
  cursor: not-allowed;
}

#btnGenerateMissionReportDocx:not(.btn-report-disabled),
#btnGenerateMissionReportPdf:not(.btn-report-disabled){
    border-width: 3px;
}

#btnGenerateMissionReportDocx.btn-report-disabled,
#btnGenerateMissionReportPdf.btn-report-disabled{
    pointer-events: none;
    opacity: 0.15;
    cursor: not-allowed;
}

/* Exception : en mode lecture (readMode), ils redeviennent actifs */
#btnGenerateMissionReportDocx.btn-report-disabled.readMode {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
    border-color: blue;
    border-width: 3px;
}
#btnGenerateMissionReportPdf.btn-report-disabled.readMode {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
    border-color: red;
    border-width: 3px;
}

/* ---------------------- */
/* SPINNER LOADER MISSION */
/* ---------------------- */

.loader-mission {
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .loader-mission > img {
    width: 100px;
  }
  
  .loader-mission.hidden {
    animation: fadeOut 2s;
    animation-fill-mode: forwards;
  }
  
  /* ----------------------- */
  /* GESTION TOOLTIP onglet6 */
  /* ----------------------- */

  
  .tooltip.show {
    opacity: 1;
  } 
  .tooltip-body {
    background-color: white; 
  }

  .tooltip-inner {
    border: 1px solid black; /* Ajoute une bordure noire autour du tooltip */
    opacity: 1;
  }

  .tooltip .tooltip-inner {
    background-color: white;
    color: black;
    max-width: 500px;
    text-align: left;
    border-radius: 8px; /* Ajoute des coins arrondis */
    border: 1px solid #ccc; /* Ajoute une bordure */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Ajoute une ombre */
  }
  
   .tooltip-header {
    background-color: grey;
    color: white;
    text-align: center;
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px; 
  }

  .color-element
  {
    color: red;
  }

  .icon-ok
  {
    color: green;
  }

  .icon-no-ok
  {
    color: red;
  }

/* ---------------------------  */
/* Gestion couleur progress-bar */
/* ---------------------------  */

/* Couleur pour 0-20% */
.red-bg {
  background-color: #ff0000; /* Rouge */
}

/* Couleur pour 21-40% */
.orange-bg {
  background-color: #ff6600; /* Orange */
}

/* Couleur pour 41-60% */
.yellow-bg {
  background-color: #ffcc00; /* Jaune */
}

/* Couleur pour 61-80% */
.yellow-green-bg {
  background-color: rgb(74, 197, 37); /* Jaune-vert */
}

/* Couleur pour 81-100% */
.green-bg {
  background-color: green; /* Vert */
}

/* --------------------------  */
/* BOUTON gestion échantillon  */
/* --------------------------  */


.imgSamples-container {
  position: relative;
  display: inline-block;
}

.imgSamples {
  width: 50px; /* Ajuste selon tes besoins */
  height: auto;
}

.overlayLogoSamples {
  position: absolute;
  top: 0;
  right: 0;
  background-color: blue;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  transform: translate(50%, -50%); /* Ajuste la position */
}

/* --------------------------  */
/* BOUTON gestion multimedias  */
/* --------------------------  */

.imgFiles-container {
  position: relative;
  display: inline-block;
}

.imgFiles {
  width: 50px; /* Ajuste selon tes besoins */
  height: auto;
}

.overlayLogoMultimedias {
  position: absolute;
  top: 0;
  right: 0;
  background-color: blue;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  transform: translate(50%, -50%); /* Ajuste la position */
}
/* --------------------------  */

/* --------------------------------------------------------  */
/* gestion filtrage tableaux SRC, SRM, MRC (champ recherche) */
/* --------------------------------------------------------  */

.custom-hide {
  display: none !important;
}

.search-not-empty {
  background-color: #fff3cd; /* jaune pâle pour signaler une recherche active */
  border: 1px solid #ffc107;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* --------------------------- */
/* gestion modal action tab3   */
/* --------------------------- */

.card-action.selected {
    border-width: 3px !important;
}

.card-action .checkmark {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1.2rem;
    color: green;
    display: none;
}

.card-action.selected .checkmark {
    display: block;
}

.card-action {
    cursor: pointer;
}
.disabled-card {
    cursor: not-allowed;
}


/* ---------------------------  */
/* gestion des accordions      */
/* ---------------------------  */

/* SRM */
#SRMheading, #SRMheadingButton
{
    background-color: #dceeff;

}

#nouvelElementBodySRM
{
  border: 5px solid #dceeff;
}

/* SRC */
#SRCheading, #SRCheadingButton
{
    background-color: #f8d7da;

}

#nouvelElementBodySRC
{
  border: 5px solid #f8d7da;
}

/* MRC */
#MRCheading, #MRCheadingButton, #Level1MRCheading, #Level1MRCheadingButton, #Level2MRCheading, #Level2MRCheadingButton
{
    background-color: #fff3cd;
}

#nouvelElementBodyMRC, #nouvelElementBodyLevel1MRC, #nouvelElementBodyLevel2MRC
{
  border: 5px solid #fff3cd;
}

/* SYNCHRO */
#synchroheading, #synchroheadingButton
{
    background-color: white;
}

#nouvelElementBodySynchro
{
  border: 5px solid white;
}

/* --------------------------------------------------------  */

/* ---------------------------  */
/*          DIVERS              */
/* ---------------------------  */

.btn-danger[disabled]
{
    pointer-events: auto;
    cursor: not-allowed;
    opacity: 0.15;
}

.swal-text-left {
  text-align: left; /* Alignement à gauche */
}

.btnDeleteMission:disabled{
    pointer-events: auto;
    opacity: 0.15;
    cursor: not-allowed;
}
