header hr {
  width: 25%;
}

#header-content {
  text-align: center;
  padding-bottom: 1em;
}


/* ------------------------- */
/*   SELECTEUR COMPETENCES   */
/* ------------------------- */
#competencesList {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5em 0;
}

#competencesList p {
  font-weight: bold;
  margin-right: 2em;
}

#competencesList button {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);

  width: 15%;
  padding: 0.4em 0;

  margin: 0 0.25em;

  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: 0.3s;
}

#competencesList button.selected {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--secondary-color);
}


#competencesButton {
  width: 50%;
}

@media screen and (max-width: 1024px) {
  #competencesList {
    display: flex;
    flex-direction: column;
  }

  #competencesButton {
    display: flex;
  }

  [id^="cmp_"] {
    flex-basis: 33%;
    flex-wrap: wrap;
  }
}

/* ------------------------- */
/*          PROJETS          */
/* ------------------------- */
#projets {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5em;
  padding: 1.5em 2em;
}

#projets article {
  width: calc(33.333% - 1.5em);
  border-radius: 10px;
  border: 2px solid var(--secondary-color);

  display: flex;
  flex-direction: column;
  padding: 1em;
  box-sizing: border-box;
  gap: 0.75em;
}

@media screen and (max-width: 1024px) {
  #projets article {
    width: 100%;
  }
}

/* --- HEAD --- */
article .head {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
}

article .head img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

article .head > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

article .head h1 {
  font-size: 1.1em;
  margin: 0 0 0.2em 0;
  color: var(--secondary-color);
}

article .head p {
  margin: 0;
  font-size: 0.85em;
  color: #555;
  text-align: justify;
}

article .head div div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

article .head div div img {
  width: 8%;
  height: 8%;
}


/* --- COMPETENCES --- */
article .competences h3,
article .outils h3 {
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary-color);
  margin: 0 0 0.4em 0;
}

article .competences div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

article .competences div p {
  margin: 0;
  font-size: 0.78em;
  background-color: #e0e9ed;
  color: var(--secondary-color);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-weight: 500;
}


/* --- OUTILS --- */
article .outils div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  align-items: center;
}

article .outils div img,
#modalTools img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  padding: 3px;
}


/* --- Bouton infos --- */
article .bouton {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

article .bouton a.btn {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85em;
  padding: 0.35em 0.9em;
}







/* ------------------------- */
/*      MODAL & OVERLAY      */
/* ------------------------- */
.hidden {
  visibility: hidden;
}

body.modal-open {
  overflow: hidden;
}

#overlay {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);

  left: 0;
  top: 0;
  height: 100%;
  width: 100%;

  z-index: 1;


  overflow: scroll;
  overflow-x: hidden;
}


/* Modal général */
#modal {
  background-color: var(--primary-color);
  width: 70%;

  height: auto;
  margin: 3em auto;
  border-radius: 10px;

  padding: 1em;

  color: var(--secondary-color)
}

.modalFlex {
  display: flex;
}

.modalGap {
  gap: 2em;
}

#modal h2 {
  margin: 0;
  font-size:  1.2em;
}


/* Header du modal */
#modalTitle {
  text-align:  center;

  font-size: 1.5em;
  margin: 0.5em;
}

#modalHeader hr {
  width: 40%;

  border-top: 3px solid var(--secondary-color);
}

#modalHeaderDesc {
  justify-content: space-between;
  align-items: center;
}

#modalTextHeader {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#modalBlocInfos {
  flex-shrink: 1;
  flex-grow: 1;
  /*flex-basis: auto;*/
}

#modalThumbnail {
  width: 10em;
  height: 10em;

  border-radius: 25px;
  object-fit: cover;

}

.modalCaracteristique {
  gap: 0.5em;
  font-size:  0.90em;
}

.modalCaracteristique img {
  width: 4%;
}

.modalCaracteristique div {
  display:  flex;
  gap: 0.5em;
}

.modalCaracteristique p {
  margin: 0.5em;
}

#modalBlocCompetence {
  background-color: var(--secondary-color);
  padding: 0.8em;

  border-radius: 5px;
  color: var(--primary-color);

  width: 100%;

  margin: 1.4em auto;

  flex-grow: 0;
  flex-shrink: 1;
  flex-basis: 50%;
}

#modalCompetencesList {
  gap: 0.5em;
  flex-wrap: wrap;

  margin-top: 1em;
}

#modalCompetencesList p {
  background-color: var(--primary-color);
  color: var(--secondary-color);


  padding: 0.5em;
  border-radius: 5px;

  margin: 0;

  flex-grow: 0;
  flex-shrink: 0;
}

#modal > hr {
  width: 80%;

  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

/* Corps du modal */
#modalBody {
  flex-wrap: nowrap;
}

#modalBodyLeft {
  border-right: 1px solid rgba(0, 0, 0, 0.2);

  padding: 0 1em;
}

#modalBody > div {
  width: 50%;
}

.modalSection div:nth-of-type(1) {
  display: flex;
  gap:  0.5em;
}

.modalSection div:nth-of-type(1) img {
  width: 3%;
}


.modalSection p {
  margin-top: 0.5em;

  margin-bottom: 0;

  line-height: 1.5em;
  text-align: justify;
}

.modalSection ul {
  margin-top: 0.5em;
  margin-bottom: 0;

  padding-left: 1.3em;
  line-height: 1.5em;
}

.modalSection {
  padding: 1em;
}

.modalSection:not(h2) {
  font-size: 0.9em;
}

#modalRoleSection {
  background-color: #e5e8ec;
  border-radius: 5px;
}

#modalImages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: 120px;
  gap: 10px;
}

#modalImages img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.modalSizeHauteur {
  grid-column: span 2;
}

.modalSizeLargeur {
  grid-row: span 2;
}

.modalSizeGrand {
  grid-column: span 2;
  grid-row: span 2;
}

/* Footer du modal */
#modalFooter {
  margin-top: 1em;
}

#btnModalFermer {
  display: block;
  margin: 0 auto;

  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: 1px solid var(--secondary-color);
  padding: 0.5em 3em;
  border-radius: 5px;

  font-size: 1em;
  font-weight: bold;
  cursor: pointer;

  transition: 0.2s ease;
}

#btnModalFermer:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}


@media screen and (max-width: 1024px) {
  #modal {
    width: 85%;
  }

  #modalThumbnail {
    width: 0;
  }

  #modalHeaderDesc,
  #modalCaracteristique,
  #modalListeCaracteristiques {
    flex-direction:  column;
  }

  #modalBody {
    display: flex;
    flex-direction: column;
  }

  #modalBodyLeft {
    border: none;
    width: 100%;
  }

  #modalBlocCompetence {
    width: 90%;
  }
}