/* Galerie de captures réelles, suivie des autres jeux. */
.portfolio-heading {
  margin-bottom: 40px;
}
.portfolio-heading .page-intro {
  max-width: 52ch;
}
.project-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
/* Adaptation du sélecteur de Yaya12085 (Uiverse), en bleu nuit.
   Source et licence : assets/licenses/uiverse-yaya12085-filters.txt. */
.project-filters {
  display: inline-flex;
  gap: 4px;
  width: 304px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid rgb(117 180 255 / 24%);
  border-radius: 12px;
  background: rgb(6 19 33 / 84%);
}
.project-filters button {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
@media (hover: hover) {
  .project-filters button:hover {
    color: var(--ink);
    background: rgb(117 180 255 / 10%);
  }
}
.project-filters button[aria-pressed="true"] {
  border-color: rgb(117 180 255 / 72%);
  color: #fff;
  background: #245ca8;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}
.project-filters button:focus-visible {
  outline: 2px solid #add8e6;
  outline-offset: 2px;
}
.project-search {
  --search-accent: #add8e6;
  flex: 0 1 280px;
  min-width: 0;
}
/* Animation adaptée de liyaxu123 (Uiverse), licence dans assets/licenses. */
.project-search-shell {
  position: relative;
  padding-top: 30px;
}
.project-search label {
  position: absolute;
  top: 39px;
  left: 0;
  max-width: calc(100% - 44px);
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
  cursor: text;
  white-space: nowrap;
}
.project-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.project-search-wave > span {
  display: inline-block;
  min-width: 4px;
  transition: transform 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition-delay: calc(var(--letter-index) * 30ms);
}
.project-search input:focus + label .project-search-wave > span,
.project-search
  input:not(:placeholder-shown)
  + label
  .project-search-wave
  > span {
  color: var(--search-accent);
  transform: translateY(-30px);
}
.project-search input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 8px 44px 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}
.project-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.project-search input:focus {
  outline: none;
}
.project-search-clear {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  color: var(--ink);
  background: transparent;
}
.project-search-clear:disabled {
  visibility: hidden;
}
.project-count {
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 13px;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.project-card {
  min-width: 0;
  padding-bottom: 48px;
}
.project-entry {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.project-entry:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}
.project-media {
  width: 100%;
  aspect-ratio: 1.44;
  margin: 0 0 20px;
}
.project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-copy {
  min-width: 0;
}
.project-copy h2 {
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}
.project-description {
  max-width: 50ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
/* Inspiration visuelle : reshades, https://uiverse.io/reshades/dull-snake-38.
   CSS réécrit pour les liens du portfolio et le bouton de réinitialisation. */
.project-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgb(89 155 241 / 75%);
  border-radius: 8px;
  background: rgb(46 105 183 / 12%);
  color: #dfedff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 120ms ease;
}
.project-action {
  margin-top: 16px;
}
.project-action::after,
.text-button::after {
  content: "";
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.project-entry:focus-visible .project-action,
.text-button:focus-visible {
  border-color: #75b4ff;
  background: #245ca8;
}
@media (hover: hover) {
  .project-entry:hover .project-action,
  .text-button:hover {
    border-color: #75b4ff;
    background: #245ca8;
  }
}
.project-entry:active .project-action,
.text-button:active {
  transform: translateY(1px);
}
.project-row {
  grid-column: 1 / -1;
  padding: 0;
  border-top: 1px solid var(--line);
}
.project-row .project-entry {
  padding: 28px 0;
}
.project-row .project-copy {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: 24px;
}
.project-row h2 {
  margin: 0;
}
.project-row .project-action {
  margin: 0;
}
.project-card-pending {
  padding: 28px 0;
}
.project-card-pending .project-copy {
  grid-template-columns: minmax(160px, 0.9fr) minmax(0, 1.5fr);
}
.project-status {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}
.empty-projects {
  padding: 48px 0;
}
.empty-projects p {
  margin: 0 0 16px;
}
@media (max-width: 900px) {
  .project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .project-row .project-copy {
    grid-template-columns: minmax(140px, 0.8fr) minmax(0, 1.2fr);
  }
  .project-row .project-action {
    grid-column: 2;
  }
}
@media (max-width: 600px) {
  .project-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-search {
    flex-basis: 100%;
  }
  .project-row .project-copy,
  .project-card-pending .project-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .project-row .project-action {
    grid-column: auto;
  }
}
@media (forced-colors: active) {
  .project-action {
    border-color: LinkText;
    color: LinkText;
  }
  .text-button {
    border-color: ButtonText;
    color: ButtonText;
  }
  .project-filters {
    border-color: ButtonText;
    background: Canvas;
  }
  .project-filters button {
    color: ButtonText;
  }
  .project-filters button[aria-pressed="true"] {
    border-color: Highlight;
    color: HighlightText;
    background: Highlight;
    box-shadow: none;
  }
  .project-filters button:focus-visible {
    outline-color: Highlight;
  }
  .project-search input {
    border-bottom-color: CanvasText;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-entry:active .project-action,
  .text-button:active {
    transform: none;
  }
  .project-search-wave > span {
    transition: none;
    transition-delay: 0s;
  }
}
