/* ── PORTFOLIO PAGE (pf-*) ──
   Replaces the old masonry look. The shared modal / .pt-* styles stay in projets-page.css. */

.pf-hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px; align-items: end; padding: 150px 52px 56px;
}
.pf-hero .hero-heading { font-size: clamp(3rem, 7.4vw, 7.6rem); }
.pf-hero-desc { color: var(--muted); font-size: 1.02rem; line-height: 1.75; max-width: 480px; }
.pf-hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pf-hero-facts li {
  background: var(--surface); box-shadow: var(--shadow-sm); border-radius: 18px;
  padding: 16px 22px; display: flex; flex-direction: column; gap: 4px; min-width: 120px;
}
.pf-hero-facts b { font-weight: 800; font-size: 1.9rem; letter-spacing: -.04em; line-height: 1; }
.pf-hero-facts span { font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Filters */
.pf-work { padding: 0 52px 40px; }
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.pf-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-xs); font-size: .88rem; font-weight: 500; color: var(--white);
  transition: background .25s, color .25s, box-shadow .25s, transform .2s;
}
.pf-chip i { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--muted); transition: color .25s; }
.pf-chip:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.pf-chip.is-active { background: var(--white); color: #fff; }
.pf-chip.is-active i { color: rgba(255, 255, 255, .7); }
.pf-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Grid: 12 columns, each card sets --span */
.pf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 28px; align-items: start; }
.pf-card { grid-column: span var(--span, 4); min-width: 0; }
.pf-card[hidden] { display: none; }
.pf-grid.is-filtered .pf-card { grid-column: span 4; }
.pf-grid.is-filtered .pf-card--lead .pf-media { aspect-ratio: 4 / 3; }

.pf-media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); background: linear-gradient(145deg, #7360E4, #2A1F5C);
  box-shadow: var(--shadow-sm); transition: box-shadow .35s, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.pf-card:nth-child(3n+2) .pf-media { aspect-ratio: 1 / 1; }
.pf-card--lead .pf-media { aspect-ratio: 16 / 11; }
.pf-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
.pf-media-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; font-weight: 800; color: rgba(255, 255, 255, .5);
}
.pf-media-tag {
  position: absolute; left: 20px; bottom: 20px; display: inline-flex; gap: 8px; align-items: center;
  padding: 11px 20px; border-radius: 999px; background: var(--surface); color: var(--white);
  font-size: .8rem; font-weight: 700; box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .4s cubic-bezier(.16, 1, .3, 1);
}
.pf-card:hover .pf-media { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.pf-card:hover .pf-media img { transform: scale(1.05); }
.pf-card:hover .pf-media-tag, .pf-card:focus-within .pf-media-tag { opacity: 1; transform: none; }

.pf-info { padding: 22px 6px 0; }
.pf-meta { font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; min-height: 1em; }
.pf-title { font-weight: 800; font-size: clamp(1.3rem, 2.1vw, 2rem); letter-spacing: -.03em; line-height: 1.05; }
.pf-title a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .4s cubic-bezier(.16, 1, .3, 1), color .2s; padding-bottom: 2px; }
.pf-card:hover .pf-title a { background-size: 100% 2px; }
.pf-card--lead .pf-title { font-size: clamp(1.7rem, 3.2vw, 3rem); }
.pf-desc { margin-top: 14px; color: var(--muted); line-height: 1.7; max-width: 560px; font-size: .98rem; }
.pf-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pf-tags li { font-size: .74rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-xs); }

/* Cities */
.pf-cities { padding: 60px 52px 40px; }
.pf-cities-inner { background: var(--surface); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); padding: 48px 52px; }
.pf-cities-title { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; }
.pf-cities-text { margin-top: 14px; color: var(--muted); max-width: 560px; line-height: 1.7; }
.pf-cities-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pf-cities-list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px;
  background: var(--bg); box-shadow: var(--shadow-xs); font-weight: 500; font-size: .9rem;
  transition: background .25s, color .25s, box-shadow .25s, transform .2s;
}
.pf-cities-list a:hover { background: var(--accent); color: #fff; box-shadow: var(--shadow-hover); transform: translateY(-2px); }

@media (max-width: 1100px) {
  .pf-grid { gap: 44px 22px; }
  .pf-card { grid-column: span 6; }
  .pf-card--lead { grid-column: span 12; }
  .pf-grid.is-filtered .pf-card { grid-column: span 6; }
}
@media (max-width: 900px) {
  .pf-hero { grid-template-columns: 1fr; padding: 120px 24px 40px; gap: 32px; }
  .pf-work, .pf-cities { padding-left: 24px; padding-right: 24px; }
  .pf-cities-inner { padding: 32px 24px; }
}
@media (max-width: 640px) {
  .pf-hero-facts { flex-wrap: nowrap; gap: 8px; }
  .pf-hero-facts li { flex: 1; min-width: 0; padding: 14px; }
  .pf-hero-facts b { font-size: 1.5rem; }
  .pf-hero-facts span { font-size: .62rem; letter-spacing: .06em; }
  .pf-card, .pf-grid.is-filtered .pf-card { grid-column: 1 / -1; }
  .pf-card:nth-child(3n+2) .pf-media { aspect-ratio: 4 / 3; }
  .pf-media-tag { opacity: 1; transform: none; }
  .pf-filters { flex-wrap: nowrap; overflow-x: auto; margin-right: -24px; padding: 4px 24px 8px 0; scrollbar-width: none; }
  .pf-filters::-webkit-scrollbar { display: none; }
  .pf-chip { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-media, .pf-media img, .pf-media-tag, .pf-chip { transition: none; }
}
