/* =========================================================================
   Portfolio / Réalisations — filtres combinés, recherche, tri, badges,
   skeleton de chargement, galerie/lightbox (page projet.html)
   ========================================================================= */

/* ---- Barre d'outils (recherche + tri) ---- */
.portfolio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.portfolio-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.portfolio-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: .9rem;
}
.portfolio-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.portfolio-sort {
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: .9rem;
  min-height: 44px;
}
.filter-btn .filter-count {
  opacity: .75;
  font-size: .75em;
  margin-left: 2px;
}
.portfolio-empty {
  display: none;
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
}
.portfolio-empty.show { display: block; }

/* ---- Skeleton de chargement (#28) ---- */
.project-skeleton {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}
.project-skeleton .sk-thumb { height: 11rem; }
.project-skeleton .sk-line { height: .8rem; margin: 14px 20px; border-radius: 4px; }
.project-skeleton .sk-line.w-60 { width: 60%; }
.project-skeleton .sk-line.w-90 { width: 90%; }
.project-skeleton .sk-line.w-40 { width: 40%; }
.sk-shimmer {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.4s ease infinite;
}
@keyframes sk-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
html.dark .sk-shimmer {
  background: linear-gradient(90deg, #1f2937 25%, #263140 37%, #1f2937 63%);
  background-size: 400% 100%;
}

/* ---- Badge statut projet ---- */
.project-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
}

/* ---- Bouton "Charger plus" ---- */
#loadMoreProjects { min-height: 44px; }

/* ---- Page projet.html : galerie / lightbox ---- */
.project-gallery-main {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 90, 245, .12), rgba(255, 122, 0, .12));
  cursor: zoom-in;
}
.project-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.project-gallery-thumbs button {
  width: 72px; height: 56px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer;
}
.project-gallery-thumbs button.active { border-color: var(--primary); }
.project-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 7, 13, .92);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  width: 44px; height: 44px; border-radius: 9999px;
  background: rgba(255,255,255,.1); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}

/* ---- Bloc résultats ---- */
.project-result-item {
  background: rgba(30, 90, 245, .06);
  border-radius: 10px;
  padding: 14px 16px;
}

/* ---- Partage social (#12) ---- */
.share-btn {
  width: 40px; height: 40px; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: #334155; transition: background-color .2s ease, color .2s ease;
}
.share-btn:hover { background: var(--primary); color: #fff; }
html.dark .share-btn { background: #1f2937; color: #cbd5e1; }

/* ---- Fil d'Ariane ---- */
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: var(--primary); }
