/* ========================================
   FONTS & BASE
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Inter', sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   ARRIÈRE-PLAN ANIMÉ (tsParticles)
======================================== */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Blobs décoratifs en arrière-plan (dégradés animés) */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  z-index: -1;
  animation: blobFloat 20s ease-in-out infinite alternate;
}

.bg-blob-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle, #3B82F6, transparent 70%);
}

.bg-blob-2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  left: -200px;
  background: radial-gradient(circle, #F59E0B, transparent 70%);
  animation-delay: -5s;
}

.bg-blob-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #10B981, transparent 70%);
  animation-delay: -10s;
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -60px) scale(1.2); }
}

/* ========================================
   SKELETON LOADER
======================================== */
.skeleton {
  background: #E2E8F0;
  border-radius: 0.75rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
  background: #E2E8F0;
  border-radius: 1rem;
  overflow: hidden;
  animation: pulse 1.5s ease-in-out infinite;
}
.skeleton-card .image {
  height: 16rem;
  background: #CBD5E1;
}
.skeleton-card .line {
  height: 1rem;
  background: #CBD5E1;
  margin: 0.75rem 1.25rem;
  border-radius: 0.25rem;
}
.skeleton-card .line.short {
  width: 60%;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   HEADER MODERN
======================================== */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

header .nav-link {
  position: relative;
  font-weight: 500;
  padding-bottom: 0.25rem;
  transition: color 0.2s;
}
header .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #3B82F6, #F59E0B);
  transition: width 0.3s ease;
}
header .nav-link:hover::after,
header .nav-link.active::after {
  width: 100%;
}
header .nav-link.active {
  color: #1E3A8A;
  font-weight: 600;
}

/* ========================================
   BOUTONS
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  background: #2563EB;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}

.btn-secondary {
  background: #1E3A8A;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35);
}
.btn-secondary:hover {
  background: #172554;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.45);
}

.btn-gold {
  background: #F59E0B;
  color: #0F172A;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-gold:hover {
  background: #D97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
}

.btn-outline {
  background: transparent;
  color: #3B82F6;
  border: 2px solid #3B82F6;
}
.btn-outline:hover {
  background: #3B82F6;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.8rem 2.5rem;
  font-size: 1rem;
}

/* ========================================
   CARTES MODERNES
======================================== */
.card-modern {
  background: #FFFFFF;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(59, 130, 246, 0.06);
}

.card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.10);
}

.card-modern .card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #FFFFFF;
  background: linear-gradient(135deg, #3B82F6, #1E3A8A);
  margin-bottom: 1rem;
}

/* ========================================
   COMPTEUR FLOTTANT
======================================== */
#countdown-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  z-index: 999;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

#countdown-timer {
  font-family: 'Inter', monospace;
  font-weight: 700;
  color: #1E3A8A;
  letter-spacing: 0.5px;
}

#countdown-ended {
  color: #EF4444;
  font-weight: 700;
}

/* ========================================
   MODALE
======================================== */
.modal-overlay {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-content {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 440px;
  width: 92%;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
  animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========================================
   TABLEAU ADMIN
======================================== */
.admin-table th {
  background: #F1F5F9;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #475569;
  padding: 0.75rem 1rem;
}
.admin-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #E2E8F0;
}
.admin-table tr:hover {
  background: #F8FAFC;
}

/* ========================================
   ANIMATIONS SUPPLÉMENTAIRES
======================================== */
[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 640px) {
  #countdown-container {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .card-modern {
    padding: 1rem;
  }
  .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
  }
  .bg-blob {
    display: none;
  }
}
/* ========================================
   LIGHTBOX (visionneuse)
======================================== */
#lightbox {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#lightbox button {
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

#lightbox button:hover {
  opacity: 0.7;
}

#lightbox-image {
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

#lightbox-caption {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 8px;
}

/* Animation d'entrée de la lightbox */
#lightbox:not(.hidden) {
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}