:root {
  --primary-gradient: linear-gradient(135deg, #ffd54f 0%, #5c6bc0 100%);
  --secondary-gradient: linear-gradient(135deg, #5c6bc0 0%, #3f51b5 100%);
  --bg-dark: #0f0f1a;
  --bg-card: rgba(26, 27, 47, 0.95);
  --bg-card-hover: rgba(35, 37, 58, 0.98);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --accent-gold: #ffd54f;
  --accent-purple: #5c6bc0;
  --shadow-glow: 0 0 30px rgba(92, 107, 192, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

#vanta-bg {
  min-height: 100vh;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 80px 20px;
  animation: fadeIn 1s ease-in;
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(92, 107, 192, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(92, 107, 192, 0.8);
  }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  animation: fadeIn 1.2s ease-in;
}

.section {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.section:hover::before {
  transform: scaleX(1);
}

.section h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--accent-purple);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.section h2 i {
  font-size: 1.2em;
  color: var(--accent-gold);
}

.section p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  color: var(--text-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 25px;
  padding: 16px 32px;
  background: var(--secondary-gradient);
  color: var(--text-primary);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(92, 107, 192, 0.3);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(92, 107, 192, 0.5);
  background: linear-gradient(135deg, #6c7dd0 0%, #4f63c5 100%);
}

.btn:active {
  transform: translateY(-1px);
}

.highlight {
  color: var(--accent-gold);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.countdown-box {
  background: linear-gradient(135deg, rgba(92, 107, 192, 0.2), rgba(63, 81, 181, 0.2));
  padding: 25px 15px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid rgba(92, 107, 192, 0.3);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.countdown-box:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(255, 213, 79, 0.3);
}

.countdown-box span {
  display: block;
  font-size: 2.5em;
  font-weight: 800;
  color: var(--accent-gold);
  position: relative;
  z-index: 1;
  text-shadow: 0 0 20px rgba(255, 213, 79, 0.5);
}

.countdown-box small {
  display: block;
  font-size: 0.9em;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin-top: 8px;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

#countdown-section.urgent .countdown-box {
  animation: pulseUrgent 1.5s infinite alternate;
  border-color: #ff4757;
}

@keyframes pulseUrgent {
  0% {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.3), rgba(200, 30, 50, 0.3));
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
  }
  100% {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.5), rgba(200, 30, 50, 0.5));
    box-shadow: 0 0 40px rgba(255, 71, 87, 0.8);
  }
}

.trophies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.trophy {
  background: linear-gradient(135deg, rgba(26, 27, 47, 0.9), rgba(35, 37, 58, 0.9));
  border: 2px solid rgba(92, 107, 192, 0.4);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.trophy::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 213, 79, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.trophy:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-gold);
  box-shadow: 0 12px 40px rgba(255, 213, 79, 0.3);
}

.trophy:hover::before {
  opacity: 1;
}

.trophy-icon {
  font-size: 3.5em;
  margin-bottom: 15px;
  display: block;
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.trophy:nth-child(1) .trophy-icon {
  animation-delay: 0s;
}

.trophy:nth-child(2) .trophy-icon {
  animation-delay: 0.5s;
}

.trophy:nth-child(3) .trophy-icon {
  animation-delay: 1s;
}

.trophy h3 {
  font-size: 1.5em;
  color: var(--accent-gold);
  margin-bottom: 15px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.trophy p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.criteria-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.criteria-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin-bottom: 12px;
  background: rgba(92, 107, 192, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--accent-purple);
  transition: all 0.3s ease;
}

.criteria-item:hover {
  background: rgba(92, 107, 192, 0.2);
  transform: translateX(5px);
  border-left-color: var(--accent-gold);
}

.criteria-item i {
  font-size: 1.5em;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.criteria-item span {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

footer {
  margin-top: 80px;
  padding: 40px 20px;
  background: rgba(15, 15, 26, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  backdrop-filter: blur(10px);
}

.bandeau-footer {
  padding: 15px;
  background: var(--secondary-gradient);
  border-radius: 12px;
  margin-bottom: 20px;
  font-weight: 600;
}

.bandeau-footer a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.bandeau-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-purple);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.project-card {
  background: rgba(26, 27, 47, 0.6);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-purple);
  box-shadow: 0 8px 25px rgba(92, 107, 192, 0.3);
}

.project-card h4 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.project-stats {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.steps-list {
  color: var(--text-secondary);
  line-height: 2;
  padding-left: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

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

.projects-empty-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.projects-empty-sub {
  font-size: 0.9em;
  margin-top: 10px;
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.project-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.project-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.project-meta-title {
  margin: 0;
  font-size: 1.1rem;
}

.project-meta-author {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 4px 0 0 0;
}

@media (max-width: 768px) {
  .container {
    padding: 40px 15px;
  }

  .section {
    padding: 25px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .countdown-box {
    padding: 20px 10px;
  }

  .countdown-box span {
    font-size: 2em;
  }

  .trophies {
    grid-template-columns: 1fr;
  }
}
