/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: #bfa16f;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #d4c484;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== PARTICULES ARRIÈRE-PLAN ===== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 20% 50%, rgba(191, 161, 111, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(212, 196, 132, 0.08) 0%, transparent 50%);
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(191, 161, 111, 0.6);
  border-radius: 50%;
  animation: float 15s infinite;
  box-shadow: 0 0 10px rgba(191, 161, 111, 0.8);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(191, 161, 111, 0.3);
  z-index: 1000;
  padding: 1.2rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #bfa16f;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 20px rgba(191, 161, 111, 0.4);
}

.logo:hover {
  color: #d4c484;
  transform: scale(1.05);
  text-shadow: 0 0 30px rgba(212, 196, 132, 0.6);
}

/* ===== NAVIGATION ===== */
nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
}

nav a {
  color: #f5f5f5;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.3rem 0;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #bfa16f;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::before,
nav a.active::before {
  width: 100%;
}

nav a:hover,
nav a.active {
  color: #bfa16f;
}

/* ===== SECTION HERO ===== */
.filter-section {
  padding: 4rem 0 3rem;
  text-align: center;
}

.filter-section h1 {
  font-size: 4rem;
  font-family: 'Playfair Display', serif;
  margin-bottom: 1rem;
  color: #bfa16f;
  letter-spacing: 3px;
  text-shadow: 0 0 40px rgba(191, 161, 111, 0.5);
  animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subtitle {
  font-size: 1.3rem;
  color: #d4c484;
  margin-bottom: 2rem;
  animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== FILTRE MENU DÉROULANT ===== */
.filter-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  animation: fadeIn 1.5s ease-out;
}

.filter-menu label {
  font-size: 1.3rem;
  font-weight: 600;
  color: #bfa16f;
  text-shadow: 0 0 15px rgba(191, 161, 111, 0.3);
}

#categoryFilter {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  background: rgba(17, 17, 17, 0.9);
  border: 2px solid #bfa16f;
  color: #f5f5f5;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 300px;
  box-shadow: 0 4px 15px rgba(191, 161, 111, 0.4);
  appearance: none;
}

#categoryFilter:hover {
  background: rgba(17, 17, 17, 1);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(212, 196, 132, 0.5);
  border-color: #d4c484;
}

#categoryFilter:focus {
  outline: none;
  border-color: #d4c484;
  box-shadow: 0 0 25px rgba(212, 196, 132, 0.6);
  background: rgba(17, 17, 17, 1);
}

#categoryFilter option {
  background: #111;
  color: #f5f5f5;
  padding: 1rem;
  font-size: 1rem;
}

#categoryFilter::-ms-expand {
  display: none;
}

/* ===== COMPTEUR DE PROJETS ===== */
.project-count {
  text-align: center;
  margin: 2.5rem 0 1rem;
  font-size: 1.2rem;
  color: #bfa16f;
  font-weight: 600;
  animation: fadeIn 1.8s ease-out;
  text-shadow: 0 0 15px rgba(191, 161, 111, 0.4);
}

#visibleCount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d4c484;
  text-shadow: 0 0 20px rgba(212, 196, 132, 0.5);
}

/* ===== GRILLE DE PROJETS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: #111;
  border: 1px solid rgba(191, 161, 111, 0.3);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  animation: cardAppear 0.6s ease-out backwards;
  box-shadow: 0 8px 20px rgba(191, 161, 111, 0.3);
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: #bfa16f;
  box-shadow: 0 12px 30px rgba(191, 161, 111, 0.5);
}

/* Effet de lueur au survol */
.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(191, 161, 111, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.project-card:hover .card-glow {
  opacity: 1;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== IFRAME VIDÉOS ===== */
.project-card iframe {
  width: 100%;
  height: 250px;
  border: none;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.project-card:hover iframe {
  transform: scale(1.03);
}

/* ===== IMAGES ===== */
.image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img {
  transform: scale(1.1) rotate(2deg);
}

/* ===== INFO PROJET ===== */
.project-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
  background: rgba(17, 17, 17, 0.95);
}

.project-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(191, 161, 111, 0.15);
  border: 1px solid #bfa16f;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #bfa16f;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
}

.project-card:hover .project-tag {
  background: rgba(191, 161, 111, 0.25);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(191, 161, 111, 0.4);
}

.project-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #f5f5f5;
  font-weight: 600;
}

.project-info p {
  color: #d4c484;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== CARTE INSTAGRAM SPÉCIALE ===== */
.instagram-special {
  background: linear-gradient(135deg, rgba(191, 161, 111, 0.08), rgba(212, 196, 132, 0.08));
}

.instagram-card {
  width: 100%;
  height: 250px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #bfa16f, #d4c484);
  overflow: hidden;
  z-index: 1;
}

.instagram-card img {
  width: 120px;
  height: 120px;
  filter: brightness(0) invert(1);
  transition: all 0.5s ease;
  z-index: 2;
  position: relative;
}

.instagram-card:hover img {
  transform: scale(1.2) rotate(10deg);
  filter: brightness(1) invert(0);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.instagram-card:hover .overlay {
  opacity: 1;
}

.overlay a {
  color: #0a0a0a;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: #f5f5f5;
  border: 2px solid #bfa16f;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.overlay a:hover {
  background: #bfa16f;
  color: #0a0a0a;
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(191, 161, 111, 0.6);
}

.overlay svg {
  transition: transform 0.3s ease;
}

.overlay a:hover svg {
  transform: translateX(5px);
}

/* ===== CARTES RÉCITS WATTPAD ===== */
.recit-card {
  grid-column: span 1;
}

.recit-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.recit-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: transform 0.5s ease;
  position: relative;
  z-index: 1;
  border-radius: 15px 15px 0 0;
}

.project-card:hover .recit-image {
  transform: scale(1.05);
}

.recit-info {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(17, 17, 17, 0.95);
  position: relative;
  z-index: 1;
}

.recit-info h2 {
  font-size: 1.5rem;
  color: #f5f5f5;
  margin-top: 0.5rem;
  font-family: 'Playfair Display', serif;
}

.recit-info p {
  color: #d4c484;
  line-height: 1.7;
  flex: 1;
}

.wattpad-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  background: #bfa16f;
  border-radius: 50px;
  text-decoration: none;
  color: #0a0a0a;
  font-weight: 600;
  transition: all 0.3s ease;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(191, 161, 111, 0.4);
  border: 2px solid #bfa16f;
}

.wattpad-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 196, 132, 0.6);
  background: #d4c484;
  border-color: #d4c484;
}

.wattpad-logo {
  width: 28px;
  height: 28px;
  filter: brightness(0);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 3rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(191, 161, 111, 0.3);
  background-color: #0a0a0a;
}

footer p {
  color: #bfa16f;
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  
  .filter-section h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  nav ul {
    gap: 1.5rem;
    font-size: 0.9rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .filter-section h1 {
    font-size: 2.5rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  #categoryFilter {
    min-width: 250px;
  }
  
  .project-card iframe {
    height: 200px;
  }
}

@media (max-width: 480px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .filter-section h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .project-card iframe,
  .image-container,
  .instagram-card {
    height: 180px;
  }
}