/* Section Portfolio — page Agence Média (ajoutée hors bundle React) */
.pf-section,
.pf-modal {
  --pf-blue: #385cf8;
  --pf-ink: #0d1c2e;
  --pf-muted: #4b5563;
  --pf-yellow: #e9f839;
  --pf-surface: #f8fafc;
  --pf-border: rgba(148, 163, 184, 0.3);
}
.pf-section {
  position: relative;
  padding: 96px 0;
  background: #fff;
  font-family: "Inter", sans-serif;
  color: var(--pf-ink);
}
.pf-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px) { .pf-container { padding: 0 40px; } }
@media (min-width: 1360px) { .pf-container { padding: 0; } }

/* En-tête */
.pf-head { text-align: center; margin-bottom: 40px; }
.pf-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(65, 90, 238, 0.1);
  color: var(--pf-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pf-title {
  margin: 0 0 16px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.875rem, 3vw + 1rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.pf-bar { width: 80px; height: 4px; margin: 0 auto 24px; border-radius: 9999px; background: var(--pf-yellow); }
.pf-lead { max-width: 42rem; margin: 0 auto; color: var(--pf-muted); font-size: 1.125rem; line-height: 1.6; }

/* Filtres */
.pf-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.pf-filter {
  padding: 9px 18px;
  border: 1px solid var(--pf-border);
  border-radius: 9999px;
  background: #fff;
  color: var(--pf-ink);
  font: 600 0.875rem "Inter", sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pf-filter:hover { border-color: var(--pf-blue); color: var(--pf-blue); }
.pf-filter[aria-pressed="true"] { background: var(--pf-blue); border-color: var(--pf-blue); color: #fff; }
.pf-filter:focus-visible, .pf-card:focus-visible, .pf-close:focus-visible, .pf-link:focus-visible {
  outline: 3px solid var(--pf-yellow);
  outline-offset: 2px;
}

/* Grille */
.pf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pf-grid { grid-template-columns: repeat(3, 1fr); } }

.pf-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--pf-border);
  border-radius: 16px;
  background: var(--pf-surface);
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.pf-card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(13, 28, 46, 0.25); }
.pf-card[hidden] { display: none; }

.pf-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pf-blue), #1e2f8f);
}
.pf-cover--img { background: #e2e8f0; }
.pf-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 0.5s; }
.pf-card:hover .pf-cover img { transform: scale(1.05); }
.pf-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}
.pf-cover-fallback .material-symbols-outlined { font-size: 64px; }
.pf-cover-fallback::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.pf-cover-fallback::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pf-yellow);
}
.pf-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pf-blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.pf-body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 24px; }
.pf-meta { margin-bottom: 6px; color: var(--pf-muted); font-size: 0.8rem; font-weight: 500; }
.pf-card-title { margin: 0 0 8px; font-family: "Outfit", sans-serif; font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.pf-summary { margin: 0 0 18px; color: var(--pf-muted); font-size: 0.9rem; line-height: 1.55; }
.pf-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  color: var(--pf-blue);
  font-size: 0.875rem;
  font-weight: 700;
}
.pf-more .material-symbols-outlined { font-size: 18px; transition: transform 0.2s; }
.pf-card:hover .pf-more .material-symbols-outlined { transform: translateX(4px); }

.pf-empty { grid-column: 1 / -1; padding: 40px 0; color: var(--pf-muted); text-align: center; }

/* Fenêtre de détail */
.pf-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--pf-ink, #0d1c2e);
  font-family: "Inter", sans-serif;
  box-shadow: 0 30px 80px rgba(13, 28, 46, 0.35);
}
.pf-modal::backdrop { background: rgba(13, 28, 46, 0.6); backdrop-filter: blur(4px); }
.pf-modal .pf-cover { aspect-ratio: 16 / 8; }
/* Dans la fenêtre, la capture d'écran est affichée en entier */
.pf-modal .pf-cover--img { aspect-ratio: auto; }
.pf-modal .pf-cover--img img { height: auto; }
.pf-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0d1c2e;
  cursor: pointer;
}
.pf-modal-body { padding: 28px 32px 32px; }
@media (max-width: 480px) { .pf-modal-body { padding: 22px 20px 24px; } }
.pf-modal h3 { margin: 0 0 12px; font-family: "Outfit", sans-serif; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.pf-modal p { margin: 0 0 20px; color: #4b5563; line-height: 1.65; }
.pf-results { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.pf-results li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(65, 90, 238, 0.06);
  color: #0d1c2e;
  font-size: 0.95rem;
  font-weight: 500;
}
.pf-results .material-symbols-outlined { flex-shrink: 0; color: #385cf8; font-size: 20px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pf-tag { padding: 4px 12px; border-radius: 9999px; background: #f1f5f9; color: #4b5563; font-size: 0.8rem; font-weight: 500; }
.pf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 9999px;
  background: #385cf8;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pf-link:hover { background: #2645d6; }

@media (prefers-reduced-motion: reduce) {
  .pf-card, .pf-cover img, .pf-more .material-symbols-outlined { transition: none; }
  .pf-card:hover { transform: none; }
}
