html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  grid-template-columns: 0 auto 26%; 
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  grid-auto-rows: 5lh;
  gap: 1rem;
  margin: 1rem;
}

aside {
  position: sticky;
  height: 100%;
  align-self: start;
  background: lightblue;
}

.comp-card {
  background-color: lightgray;
  height: 5lh;
}

/* Durée des animations de transition */
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
  animation-duration: 0.35s;
}

/* Réduit les animations pour les utilisateurs
   ayant activé la préférence de mouvement réduit
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms;
  }
} */

input[type=checkbox] {
  margin-right: 20px;
}

input[type=checkbox]:before {
  content:"";
  display:inline-block;
  width:32px;
  height:32px;
  margin: 10px solid #444;
  background-image: url('/files/hair-color-chart-02.avif');
}

input[type=checkbox]:checked:before {
  outline: 3px solid springgreen;
}

.hair-tooltip {
  text-align: center;
  min-height: 1.5em;
  margin-block: 0.5rem;
  background-color: paleturquoise;
}

.hair-tooltip::before {
  content: "";
}

fieldset:has(#blonde:hover) .hair-tooltip::before {
  content: "Blonde";
}

fieldset:has(#lightbrun:hover) .hair-tooltip::before {
  content: "Light Brunette";
}

fieldset:has(#brunette:hover) .hair-tooltip::before {
  content: "Brunette";
}

fieldset:has(#darkbrun:hover) .hair-tooltip::before {
  content: "Dark Brunette";
}

fieldset:has(#black:hover) .hair-tooltip::before {
  content: "Black";
}

fieldset:has(#redhead:hover) .hair-tooltip::before {
  content: "Redhead";
}

fieldset:has(#gray:hover) .hair-tooltip::before {
  content: "Gray";
}

fieldset:has(#white:hover) .hair-tooltip::before {
  content: "White";
}

fieldset:has(#bald:hover) .hair-tooltip::before {
  content: "Bald";
}

fieldset:has(#other:hover) .hair-tooltip::before {
  content: "Other";
}




fieldset:has(#pink:hover) .hair-tooltip::before {
  content: "Pink";
}

fieldset:has(#blue:hover) .hair-tooltip::before {
  content: "Blue";
}

fieldset:has(#purple:hover) .hair-tooltip::before {
  content: "Purple";
}

fieldset:has(#green:hover) .hair-tooltip::before {
  content: "Green";
}

fieldset:has(#rainbow:hover) .hair-tooltip::before {
  content: "Rainbow";
}

#blonde:before {
  background-position: -2px -3px;
}

#lightbrun:before {
  background-position: -39px -3px;
}

#brunette:before {
  background-position: -75px -3px;
}

#darkbrun:before {
  background-position: -110px -3px;
}

#black:before {
  background-position: -146px -3px;
}

#redhead:before {
  background-position: -3px -42px;
}

#gray:before {
  background-position: -38px -42px;
}

#white:before {
  background-position: -75px -42px;
}

#bald:before {
  background-position: -110px -42px;
}

#other:before {
  background-position: -146px -79px;
}

#pink:before {
  background-position: -146px -42px;
}

#blue:before {
  background-position: -3px -79px;
}

#purple:before {
  background-position: -38px -79px;
}

#green:before {
  background-position: -75px -79px;
}

#rainbow:before {
  background-position: -110px -79px;
}