.carte {
  display: block;
  padding: 5px;
  border-radius: 5px;
  border: 2px solid rgb(0, 0, 0);
  color: rgb(0, 0, 0);
  text-decoration: none;
  transition: 0.6s ease;
  background-color: rgba(255, 255, 255, 0.2);
  user-select: none;
}

.carteCompetence {
  display: block;
  font-size: small;
  font-weight: 900;
  width: fit-content;
  height: fit-content;
  padding: 0.7%;
  border-radius: 5px;
  border: 2px solid rgba(135, 107, 107, 0.238);
  color: rgb(0, 0, 0);
  text-decoration: none;
  transition: 0.6s ease;
  cursor: pointer;
  background-color: rgba(88, 197, 209, 0.464);
  user-select: none;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 16px;
}

.gridCompetence {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  gap: 4px;
}

.carte .photo {
  width: 100%;
  margin-right: 0.5em;
  max-height: 30px;
  object-fit: contain;
  transition: 0.4s ease;
}

.carte .contenu {
  position: relative;
  transition: 0.4s ease;
  white-space: nowrap;
}
.carte .contenu:hover {
  transform: scale(106%);
  transform: translateY(-10%);
}

.carte .contenu {
  display: flex;
  flex-direction: row; /* Dispose l'image et le corps sur la même ligne */
  align-items: flex-start; /* Aligne l'image et le texte en haut */
  align-items: center;
  height: 100%;
}

.carte .titre {
  all: unset;
  border-radius: 15px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: underline transparent;
  transition: 0.8s ease;
}

.carte .corp {
  /* display: none;
  border-radius: 15px;
  padding-left: 2%;
  font-size: 16px;
  line-height: 1.5; */
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 110%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 1em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none; /* éviter les déclenchements intempestifs */
  transition: opacity 0.2s ease;
}

.contenu:hover .corp {
  opacity: 1;
}

.carte::before {
  transition: 0.4s ease;
}

.carteCompetence .photo {
  width: 4%;
  object-fit: contain;
  transition: 0.4s ease;
}

.carteCompetence .photo:hover {
  transform: scale(103%);
}

.carteCompetence .contenu {
  display: flex;
  flex-direction: row; /* Dispose l'image et le corps sur la même ligne */
  align-items: flex-start; /* Aligne l'image et le texte en haut */
  width: 100%;
}

.carteCompetence .titre {
  text-transform: capitalize;
  width: fit-content;
  border-radius: 15px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: underline transparent;
  transition: 0.8s ease;
}

.carteCompetence .corp {
  width: 100%;
  border-radius: 15px;
  padding-left: 2%;
  font-size: 16px;
  line-height: 1.5;
}

.carteCompetence:hover {
  opacity: 1;
  border-color: rgb(0, 0, 0);
  transform: scale(101%);
}

.carteCompetence::before {
  transition: 0.4s ease;
}
.carteCompetence .titre:hover {
  color: rgb(99, 218, 216);
}

.comp-rose {
  background-color: rgba(255, 182, 193, 0.3);
  padding: 1em;
  margin: 1em;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.comp-rose .dada {
  color: rgb(176, 0, 26);
}

.comp-vert {
  background-color: rgba(160, 255, 151, 0.3);
  padding: 1em;
  margin: 1em;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.comp-vert .dada {
  color: rgb(10, 147, 0);
}

.comp-bleu {
  background-color: rgba(161, 224, 255, 0.3);
  padding: 1em;
  margin: 1em;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.comp-bleu .dada {
  color: rgb(0, 126, 188);
}

.comp-jaune {
  background-color: rgba(233, 233, 101, 0.3);
  padding: 1em;
  margin: 1em;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.comp-jaune .dada {
  color: rgb(89, 89, 21);
}

.comp-violet {
  background-color: rgba(238, 145, 238, 0.3);
  padding: 1em;
  margin: 1em;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 15px;
}

.comp-violet .dada {
  color: rgb(134, 4, 129);
}

.categ {
  font-weight: 900;
  font-size: 20px;
}

@media (max-width: 700px) {
  .carte {
    font-size: 10px;
  }

  .carte .contenu .titre {
    font-size: 10px;
  }

  .carte .photo {
    max-height: 2.5em;
  }

  .categ strong {
    font-size: 14px;
  }

  .grid {
    gap: 5px;
  }

  .comp-rose,
  .comp-vert,
  .comp-bleu,
  .comp-jaune,
  .comp-violet {
    padding: 0.5em;
    margin: 0.5em;
  }
}
