:root {
  --bg: #0b0a12;
  --bg-alt: #14121f;
  --card: #1b1830;
  --accent: #ff2fa1;
  --accent-2: #7c3aed;
  --text: #f5f4fa;
  --text-muted: #b3aec6;
  --border: #2c2843;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
}

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

/* ---------- Intro screen ---------- */
#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #26123f 0%, #0b0a12 70%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#intro-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.intro-logo {
  width: min(420px, 80vw);
  filter: drop-shadow(0 0 30px rgba(255, 47, 161, 0.35));
  animation: float 5s ease-in-out infinite;
}

#enter-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 47, 161, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#enter-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 47, 161, 0.5);
}

.enter-icon { font-size: 0.9rem; }

.intro-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Nav ---------- */
.navbar {
  padding: 1.2rem 2rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.nav-logo { width: 130px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: var(--bg);
  overflow: hidden;
}

/* Animated background: drifting gradient blobs + rising particles */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  will-change: transform;
}

.blob-1 {
  width: 420px;
  height: 420px;
  left: -10%;
  top: -10%;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation: drift1 16s ease-in-out infinite;
}

.blob-2 {
  width: 380px;
  height: 380px;
  right: -8%;
  top: 10%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: drift2 20s ease-in-out infinite;
}

.blob-3 {
  width: 320px;
  height: 320px;
  left: 30%;
  bottom: -15%;
  background: radial-gradient(circle, #4f9dff, transparent 70%);
  animation: drift3 24s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.1); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.2); }
}

.particles {
  position: absolute;
  inset: 0;
}

.particles span {
  position: absolute;
  bottom: -20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  animation: rise linear infinite;
}

.particles span:nth-child(1) { left: 8%;  background: var(--accent);   width: 5px;  height: 5px;  animation-duration: 12s; animation-delay: 0s; }
.particles span:nth-child(2) { left: 18%; background: var(--accent-2); width: 8px;  height: 8px;  animation-duration: 16s; animation-delay: 2s; }
.particles span:nth-child(3) { left: 30%; background: #4f9dff;         width: 4px;  height: 4px;  animation-duration: 10s; animation-delay: 1s; }
.particles span:nth-child(4) { left: 45%; background: var(--accent);   width: 7px;  height: 7px;  animation-duration: 18s; animation-delay: 4s; }
.particles span:nth-child(5) { left: 58%; background: var(--accent-2); width: 5px;  height: 5px;  animation-duration: 14s; animation-delay: 3s; }
.particles span:nth-child(6) { left: 68%; background: #4f9dff;         width: 6px;  height: 6px;  animation-duration: 20s; animation-delay: 0.5s; }
.particles span:nth-child(7) { left: 78%; background: var(--accent);   width: 4px;  height: 4px;  animation-duration: 11s; animation-delay: 2.5s; }
.particles span:nth-child(8) { left: 85%; background: var(--accent-2); width: 8px;  height: 8px;  animation-duration: 17s; animation-delay: 5s; }
.particles span:nth-child(9) { left: 93%; background: #4f9dff;         width: 5px;  height: 5px;  animation-duration: 13s; animation-delay: 1.5s; }
.particles span:nth-child(10){ left: 50%; background: var(--accent);   width: 6px;  height: 6px;  animation-duration: 15s; animation-delay: 6s; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.hero-logo {
  width: clamp(220px, 32vw, 400px);
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 25px rgba(255, 47, 161, 0.3));
  animation: float 5s ease-in-out infinite;
}

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

/* Equalizer bars */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
  margin-bottom: -0.4rem;
}

.equalizer span {
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  animation: eq 1.2s ease-in-out infinite;
}

.equalizer span:nth-child(1) { height: 40%; animation-delay: -1.1s; }
.equalizer span:nth-child(2) { height: 70%; animation-delay: -0.9s; }
.equalizer span:nth-child(3) { height: 100%; animation-delay: -0.7s; }
.equalizer span:nth-child(4) { height: 55%; animation-delay: -0.5s; }
.equalizer span:nth-child(5) { height: 85%; animation-delay: -0.3s; }
.equalizer span:nth-child(6) { height: 65%; animation-delay: -0.15s; }
.equalizer span:nth-child(7) { height: 45%; animation-delay: 0s; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
  max-width: 560px;
}

/* Staggered entrance animation, triggered by .revealed on <body> */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.revealed .reveal { opacity: 1; transform: translateY(0); }
body.revealed .hero-logo.reveal { transition-delay: 0.05s; }
body.revealed .hero h1.reveal { transition-delay: 0.2s; }
body.revealed .hero-subtitle.reveal { transition-delay: 0.35s; }
body.revealed .cta-btn.reveal { transition-delay: 0.5s; }

.cta-btn {
  margin-top: 0.8rem;
  display: inline-block;
  padding: 0.9rem 2.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(255, 47, 161, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pulse 2.6s ease-in-out infinite;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 47, 161, 0.5);
  animation-play-state: paused;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 25px rgba(255, 47, 161, 0.35); }
  50% { box-shadow: 0 8px 32px rgba(255, 47, 161, 0.6); }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .particles span, .hero-logo, .intro-logo, .equalizer span, .cta-btn {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Postes ---------- */
.postes {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.postes h2, .candidature h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.benevole-badge {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.postes-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.label-hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.postes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 340px));
  justify-content: center;
  gap: 1.5rem;
}

.poste-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.6s ease;
  opacity: 0;
  transform: translateY(20px);
}

.poste-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.poste-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.poste-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.8rem;
}

.poste-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.poste-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.candidature {
  background: var(--bg-alt);
  padding: 4rem 1.5rem 5rem;
}

.form-intro {
  text-align: center;
  color: var(--text-muted);
  margin-top: -1.2rem;
  margin-bottom: 2.5rem;
}

.closed-notice {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--accent-2);
  border-radius: 20px;
  padding: 2.5rem 2rem;
}

.closed-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 0.8rem;
}

.closed-notice h3 {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
}

.closed-notice p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

#candidature-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

#candidature-form[hidden] {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group[hidden] {
  display: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="file"] {
  padding: 0.5rem;
  color: var(--text-muted);
}

.checkbox-group {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
}

.checkbox-group input {
  margin-top: 0.3rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checkbox-group label {
  color: var(--text);
  font-size: 0.9rem;
}

.submit-btn {
  margin-top: 0.5rem;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 47, 161, 0.35);
}

.form-message {
  text-align: center;
  padding: 0.9rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-message.success {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--accent-2);
  color: var(--text);
}

.form-message.error {
  background: rgba(255, 47, 161, 0.12);
  border: 1px solid var(--accent);
  color: var(--text);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.footer-logo {
  width: 90px;
  opacity: 0.8;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  #candidature-form {
    padding: 1.8rem 1.3rem;
  }
}
