/* ============================================================
   projets.css — Page Projets (carrousel Liquid Glass)
   Carrousel scroll-snap horizontal, cartes verre transparent,
   carte centrale mise en avant. Scopé .pj-*.
   ============================================================ */

.pj-section { padding: 3.5rem 0 4.5rem; }
.pj-lead {
  max-width: 640px;
  margin-top: 0.6rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
}

/* ── Carrousel : scroll horizontal natif + snap ── */
.pj-carousel-wrap {
  position: relative;
  margin-top: 2.4rem;
}
.pj-track {
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* marge interne = largeur pour que la 1re/dernière carte puissent se centrer */
  padding: 1.2rem clamp(1.25rem, 50vw - 230px, 50vw);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pj-track::-webkit-scrollbar { display: none; }

/* ── Carte projet (Liquid Glass transparent) ── */
.pj-card {
  scroll-snap-align: center;
  flex: 0 0 clamp(280px, 34vw, 460px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 24px 60px -30px rgba(0,0,0,0.7);
  /* effet "carte centrale mise en avant" : les côtés sont réduits + estompés */
  transform: scale(0.92);
  opacity: 0.55;
  transition: transform 0.45s cubic-bezier(.22,1,.36,1), opacity 0.45s ease, box-shadow 0.45s ease;
}
@supports (backdrop-filter: url(#liquid-glass)) {
  .pj-card {
    -webkit-backdrop-filter: blur(10px) url(#liquid-glass) saturate(150%);
    backdrop-filter: blur(10px) url(#liquid-glass) saturate(150%);
  }
}
.pj-card.is-active {
  transform: scale(1);
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 30px 70px -28px rgba(0,0,0,0.75);
}

/* Visuel (capture 16:10) */
.pj-media {
  display: block;
  aspect-ratio: 16 / 10;
  /* Bandes en verre clair discret (Liquid Glass), pas une bande sombre marquée */
  background: rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
/* Trace très douce de la capture dans les bandes : flou fort + faible opacité
   + éclaircie → discret, façon verre, sans bleu marine ni couleur trop présente. */
.pj-media::before {
  content: '';
  position: absolute;
  inset: -8%;
  background-image: var(--shot);
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(0.9) brightness(1.15);
  opacity: 0.35;
  transform: scale(1.12);
  z-index: 0;
}
/* L'image NETTE par-dessus, entière (contain) → on voit tout le screen */
.pj-media img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.pj-media-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 12px, transparent 12px 24px);
}
a.pj-media { transition: filter 0.3s ease; }
a.pj-media:hover { filter: brightness(1.08); }

/* Corps */
.pj-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.pj-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pj-tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.26rem 0.62rem; border-radius: 999px;
  color: #c4b5fd;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.4);
}
.pj-title {
  font-family: 'Kanit', sans-serif; font-weight: 700; font-size: 1.15rem;
  line-height: 1.25; color: #fff;
}
.pj-desc { font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.8); flex: 1; }
.pj-cta {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.3rem;
  font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 0.86rem;
  text-decoration: none; color: #fff;
  padding: 0.55rem 1.05rem; border-radius: 999px;
  background: linear-gradient(100deg, rgba(124,58,237,0.6), rgba(0,216,162,0.5));
  border: 1px solid rgba(255,255,255,0.3);
  transition: transform 0.2s cubic-bezier(.22,1,.36,1), box-shadow 0.2s ease, background 0.2s ease;
}
.pj-cta:hover { transform: translateY(-2px); background: linear-gradient(100deg, rgba(124,58,237,0.75), rgba(0,216,162,0.65)); box-shadow: 0 12px 28px -14px rgba(0,0,0,0.6); }
.pj-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Flèches ── */
.pj-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.pj-prev { left: 0.6rem; }
.pj-next { right: 0.6rem; }
.pj-nav:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.45); }
.pj-nav:active { transform: translateY(-50%) scale(0.92); }
.pj-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pj-nav[disabled] { opacity: 0.3; pointer-events: none; }

/* ── Points indicateurs ── */
.pj-dots { display: flex; justify-content: center; gap: 0.55rem; margin-top: 1.6rem; }
.pj-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.25);
  transition: background 0.25s ease, width 0.25s ease;
}
.pj-dot.active { width: 26px; border-radius: 999px; background: linear-gradient(90deg, #c4b5fd, #5eead4); }
.pj-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 600px) {
  .pj-card { flex-basis: 82vw; }
  .pj-track { padding: 1.2rem 9vw; }
  .pj-nav { display: none; }   /* sur mobile : swipe natif suffit */
}
@media (prefers-reduced-motion: reduce) {
  .pj-track { scroll-behavior: auto; }
  .pj-card { transition: none; }
}

/* Mise en avant « 1000 téléchargements » : dégradé animé (vivant), sur sa ligne */
.pj-highlight {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.pj-highlight strong {
  font-weight: 800;
  background: linear-gradient(90deg, #c4b5fd, #5eead4, #818cf8, #c4b5fd);
  background-size: 280% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pj-shine 4s linear infinite;
}
@keyframes pj-shine { to { background-position: 280% 0; } }
@media (prefers-reduced-motion: reduce) { .pj-highlight strong { animation: none; } }
