main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: calc(100% - 4.6em);
  overflow: hidden;
}

.commanditaires {
  overflow-y: auto;
}

h1.item-names,
h1.item-names a {
  font-size: 1.8rem;
  position: relative;
}

.item-commanditaire input {
  display: none;
}

.item-commanditaire label h1 {
  text-align: center;
  cursor: pointer;
  color: black;
}

.item-commanditaire .accordeon-container {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-in-out;
  padding: 0;
}

.item-commanditaire .accordeon-container .accordeon-content {
  transition: max-height 30s ease-in;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  justify-content: center;
}

.item-commanditaire input:checked ~ .accordeon-container {
  grid-template-rows: 1fr;
}

.commanditaires:has(.item-commanditaire > input:checked) label h1 {
  color: lightgrey;
}

.commanditaires:has(.item-commanditaire > input:checked)
  .item-commanditaire:has(> input:checked)
  label
  h1 {
  color: black;
}

.item-projet {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.item-projet:first-child::before,
.item-projet::after {
  content: "—";
  padding: 0 0.5rem;
}

.item-projet:hover {
  opacity: 0.5;
}

.colors-container {
  justify-content: center;
}

.item-projet:hover + .picture-projet {
  opacity: 1;
}

.picture-projet {
  position: absolute;
  left: 2.3rem;
  top: 2.3rem;
  width: calc(50% - 2.3rem);
  height: calc(100% - 4.6rem);
  background: black;
  opacity: 0;
}

.picture-projet img {
  width: 100%;
  height: auto;
  /* height: 280px; */
  display: block;
}

.item-projet p {
  text-align: center;
}

.item-projet p span {
  text-transform: uppercase;
}

@media screen and (max-width: 1440px) {
  #projets-container > .item-projet {
    grid-column: span 4;
  }
}

@media screen and (max-width: 1000px) {
  #projets-container > .item-projet {
    grid-column: span 6;
  }
  main {
    height: calc(100% - 3.15em);
  }
}

@media screen and (max-width: 650px) {
  #projets-container > .item-projet {
    grid-column: span 12;
  }
}
