.d-none {
  display: none !important;
}

.fphpelcatprod-wrapper {
  min-width: 1523px;
  margin-top: 30px;
  padding: 20px;
  text-align: center;
}

/* Titre principal */
.fphpelcatprod-wrapper h2 {
  text-align: center;
  color: #007b3a;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 30px;
}

/* Sous-titre */
.fphpelcatprod-wrapper h3 {
  text-align: center;
  color: #333;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
}

#matrice-container h3{
  text-align: left;
}

/* --- Catégories --- */
.category-selection {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.category-button {
  position: relative;
  width: 175px;
  height: 280px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #fff;
  text-align: center;
  font-weight: bold;
  font-style: italic;
  transition: outline 0.2s ease;
  outline: none;
  margin: 5px;
}

.category-button img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
  transition: filter 0.3s ease;
  z-index: 0;
}

.category-button:hover img,
.category-button.active img {
  filter: brightness(1);
}

.cat-description {
  width:140px;
  position: relative;
  z-index: 1;
  padding: 15px 10px 10px;
  font-size: 15px;
  color: white;
  word-wrap: break-word;
  line-height: 1.3;
  flex-shrink: 0;
  margin-top: 10px;
  text-align: left;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.category-button.active {
  outline: 2px solid #007b00;
}

/* --- Formations --- */
.formation-selection {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.formation-card {
  position: relative;
  height: 280px;
  width: 280px;
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #f9f9f9;
  transition: border 0.2s ease;
}

.formation-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.formation-card:hover::after,
.formation-card.selected-formation::after {
  opacity: 0;
}

.formation-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
  filter: brightness(0.7);
}

.formation-card:hover img,
.formation-card.selected-formation img {
  filter: brightness(1);
}

.formation-card.selected-formation {
  outline: 2px solid #007b00;
}

.formation-card p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  background: white;
  padding: 15px;
  font-size: 15px;
  font-style: italic;
  font-weight: bold;
  color: black;
  max-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  /*transition: all 0.4s ease;*/
  z-index: 2;
  outline: 1px solid #ddd;
  outline-offset: -1px;
  box-sizing: border-box;
  padding-top: 5px;
  line-height: 30px;
  text-align:left;
}

.formation-card:hover p,
.formation-card.selected-formation p {
  max-height: 200px;
  -webkit-line-clamp: unset;
  white-space: normal;
  overflow: hidden;
  line-height:unset;
  padding-top:15px;
  height: 140px;
}

/* --- Stagiaires --- */
.stagiaire-count-selection {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  height: 132px;
  border-top: none;
  border-left: none;
}

#nb-stagiaires {
  margin-top: -8px;
}

/* --- Matrice (bloc blanc avec titre) --- */
.matrice-section {
  min-width: 1523px;
  background: white;
  border-radius: 8px;
  padding: 30px;
  margin-top: 40px;
  margin-left:-20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.matrice-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
  text-align: left;
}

.matrice-submit-wrapper {
  text-align: center;
  margin-top: 30px;
}

/* Matrice tableau */
#matrice-wrapper {
  display: flex;
  flex-direction: row;
  width: 100%;
  overflow-x: auto;
}

.matrice-fixed-col {
  flex-shrink: 0;
}

.matrice-fixed-col .matrice-formations {
  border-collapse: collapse;
  table-layout: fixed;
}

.matrice-fixed-col th,
.matrice-fixed-col td {
  height: 130px;
  width: 400px;
  min-width: 400px;
  max-width: 400px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 0;
  vertical-align: middle;
  text-align: center;
}

.matrice-fixed-col th {
  border:none;
}

.matrice-fixed-col td > div {
  display: flex;
  height: 100%;
  width: 100%;
}

.nom-input,
.prenom-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 10px;
  font-size: 14px;
  height: 100%;
  box-sizing: border-box;
}

.nom-input {
  border-right: 1px solid #ccc;
}

.matrice-scrollable {
  overflow-x: auto;
}

.matrice-scrollable .matrice-formations {
  border-collapse: collapse;
  table-layout: fixed;
}

.matrice-scrollable th,
.matrice-scrollable td {
  height: 130px;
  min-width: 353px;
  max-width: 353px;
  border: 1px solid #ccc;
  padding: 10px;
  vertical-align: middle;
  text-align: center;
}

.matrice-scrollable td.checked {
  background-color: #7EAB27 !important;
}layout-accueil-risques-elec

/*.cell-toggle {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}*/
/*.cell-toggle {
  cursor: pointer;
  width: 100%;
  height: 100%;
  position: relative;
}*/


.cell-toggle input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2; 
}

.cell-toggle .checkmark {
  display: none;
}

.matrice-scrollable td.checked .checkmark {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 20px;
  height: 100%;
  width: 100%;
}

/* Bouton formulaire */
.fphpelcatprod-form {
  margin-top: 20px;
  text-align: center;
}

.fphpelcatprod-form button {
  padding: 12px 25px;
  font-size: 16px;
  background: #007000;
  color: white;
  border: none;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.fphpelcatprod-form button:hover {
  background: #218838;
}

/* Matrice responsive */
.matrice-formations td {
  vertical-align: middle;
  height: 70px;
  padding: 5px 10px;
}

.matrice-formations td:first-child input {
  margin: 0;
  padding: 0 5px;
}

.matrice-formations td:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  height: 40px;
}

.matrice-scrollable tbody tr td {
  height: 40px !important;
  padding: 5px 10px;
  vertical-align: middle;
}

.matrice-scrollable th div:first-child {
  margin-bottom: 5px;
}

.formation-header-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-top: 10px;
}

.formation-name {
  text-align: center;
  font-weight: bold;
  padding: 0 5px;
}

.formation-selects {
  display: inline-block;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}
/* Ligne contenant les boutons */
.stagiaire-buttons-row td {
  padding: 20px; /* Ajoute de l’espace autour du contenu */
}

/* Conteneur horizontal des boutons */
.stagiaire-buttons-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px; /* Espacement entre les deux boutons */
  margin: 5px 0;
}

/* Style des boutons */
.btn-stagiaire.dark {
  width:100px;
  background-color: #444;
  color: white;
  border: none;
  font-style: italic;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.btn-stagiaire.dark:hover {
  background-color: #333;
}

.remove-formation-btn {
  position: absolute;
  top: -8px;
  right: -14px;
  background: none;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
}

.remove-formation-btn:hover {
  color: red;
}

formation-header-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.category-scroll-wrapper {
  position: relative;
  width: fit-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-left:-25px;
}

.category-scroll-left,
.category-scroll-right {
  width: 40px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  background: #f0f0f0;
  color: #333;
  border-radius: 5px;
  user-select: none;
  transition: background 0.2s ease;
}

.category-scroll-left[disabled],
.category-scroll-right[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.category-selection-scrollable {
  display: flex;
  overflow: hidden;
  width: 1430px;
  scroll-behavior: smooth;
  gap: 10px;
  padding: 5px 0;
  margin: 0 10px;  
}


.category-selection-scrollable::-webkit-scrollbar {
  display: none;
}

.category-button {
  flex: 0 0 auto;
  width: 160px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.scroll-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
  opacity: 0.8;category-scroll-right 
}

button[disabled],
button.disabled {
  background-color: #aaa !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.hidden {
  /*display: none !important;*/
  opacity:0;
  cursor:default;
}

#animated_modal {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);  
  z-index: 10000;
  padding-top: 0;
}

#animated_modal .w3-modal-content {
  border-radius: 10px;
}