/* Style unifié pour tout le site CRABDE - Couleurs officielles : Jaune, Rouge, Noir */

/* ==================== GÉNÉRAL ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdara, sans-serif;
  background-image: url('images/fond3.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  color: #fff;
  min-height: 100vh;
  padding: 2rem 1rem;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 0, 0, 0.85) 100%);
  z-index: -1;
}

/* ==================== LOGO ==================== */
.logo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 150px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.3));
}

/* ==================== TITRES ==================== */
h1 {
  text-align: center;
  font-size: 4rem;
  margin: 2rem 0;
  font-weight: 900;
  color: #FFD700;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 
    0 0 5px rgba(255, 215, 0, 0.6),
    0 0 10px rgba(255, 0, 0, 0.4),
    0 0 15px rgba(255, 215, 0, 0.3),
    0 4px 6px rgba(0, 0, 0, 0.8);
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { 
    text-shadow: 
      0 0 5px rgba(255, 215, 0, 0.6),
      0 0 10px rgba(255, 0, 0, 0.4),
      0 0 15px rgba(255, 215, 0, 0.3),
      0 4px 6px rgba(0, 0, 0, 0.8);
  }
  50% { 
    text-shadow: 
      0 0 8px rgba(255, 215, 0, 0.8),
      0 0 15px rgba(255, 0, 0, 0.6),
      0 0 20px rgba(255, 215, 0, 0.5),
      0 4px 8px rgba(0, 0, 0, 1);
  }
}

h2 {
  color: #FFD700;
  font-size: 1.8rem;
  margin: 1.5rem 0 1rem 0;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ==================== BOXES / CARDS ==================== */
.test-box,
.info-box,
.membres-box,
.stat-card,
.content-card {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(0, 0, 0, 0.8));
  border: 3px solid #FFD700;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.test-box:hover,
.info-box:hover,
.membres-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(255, 215, 0, 0.3), 0 0 15px rgba(255, 0, 0, 0.2);
  border-color: #FF0000;
}

/* ==================== FORMULAIRES ==================== */
form {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.15), rgba(0, 0, 0, 0.7));
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease-out;
}

label {
  display: block;
  padding: 1rem;
  margin: 0.8rem 0;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  color: #fff;
  opacity: 0;
  animation: fadeInLabel 0.4s ease-out forwards;
}

@keyframes fadeInLabel {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Délai d'animation pour chaque label */
label:nth-child(1) { animation-delay: 0.1s; }
label:nth-child(2) { animation-delay: 0.15s; }
label:nth-child(3) { animation-delay: 0.2s; }
label:nth-child(4) { animation-delay: 0.25s; }
label:nth-child(5) { animation-delay: 0.3s; }
label:nth-child(6) { animation-delay: 0.35s; }
label:nth-child(7) { animation-delay: 0.4s; }
label:nth-child(8) { animation-delay: 0.45s; }
label:nth-child(n+9) { animation-delay: 0.5s; }

label:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: #FFD700;
  transform: translateX(5px);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

input[type="checkbox"]:checked + *,
input[type="radio"]:checked ~ * {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.4), rgba(255, 215, 0, 0.3));
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 1rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #FFD700;
}

/* Style pour les labels avec logo d'asso */
.asso-label {
  display: flex !important;
  align-items: center;
  gap: 1rem;
}

.asso-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

/* ==================== BOUTONS ==================== */
button,
.button,
.cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #FF0000, #FFD700);
  color: #000;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3), 0 0 10px rgba(255, 0, 0, 0.2);
  text-align: center;
  margin: 1rem 0.5rem;
  border: 2px solid #FFD700;
}

button:hover,
.button:hover,
.cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5), 0 0 15px rgba(255, 0, 0, 0.3);
  background: linear-gradient(135deg, #FFD700, #FF0000);
  color: #000;
}

button:active,
.button:active,
.cta:active {
  transform: translateY(-1px);
}

#nextBtn {
  display: block;
  margin: 2rem auto;
  font-size: 1.2rem;
  padding: 1.2rem 3rem;
}

/* ==================== LIENS ==================== */
a {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
  text-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

a:hover {
  color: #FF0000;
  text-decoration: underline;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.4);
}

p {
  line-height: 1.8;
  font-size: 1.1rem;
  text-align: center;
  margin: 1rem 0;
}

/* ==================== COMPTEUR STYLE (pour stats) ==================== */
.live-counter,
.counter-card {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), rgba(255, 215, 0, 0.2));
  border: 3px solid #FFD700;
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.2);
}

.counter-number,
.big-number {
  font-size: 3rem;
  font-weight: bold;
  color: #FFD700;
  margin: 0.5rem 0;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 2px 8px rgba(255, 0, 0, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 2px 8px rgba(255, 0, 0, 0.3);
  }
  50% { 
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 2px 12px rgba(255, 0, 0, 0.5);
  }
}

.counter-label {
  font-size: 1.2rem;
  color: #fff;
  margin: 0;
}

/* ==================== NAVIGATION ==================== */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem auto;
  padding: 1rem;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 15px;
  border: 2px solid #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.nav-link {
  padding: 0.7rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #FFD700;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

.nav-link:hover {
  background: linear-gradient(135deg, #FF0000, #FFD700);
  border-color: #FFD700;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  text-shadow: none;
}

/* ==================== BARRE DE PROGRESSION ==================== */
.progress-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 3rem;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: -1;
}

.progress-bar-fill {
  position: absolute;
  top: 20px;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #f53c3b, #fb8d48);
  transition: width 0.5s ease;
  z-index: -1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.progress-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
  transition: all 0.3s ease;
  z-index: 1;
}

.progress-step.active .progress-circle {
  background: linear-gradient(135deg, #f53c3b, #fb8d48);
  border-color: #fb8d48;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(251, 141, 72, 0.6);
}

.progress-step.completed .progress-circle {
  background: #4CAF50;
  border-color: #4CAF50;
}

.progress-step.completed .progress-circle::before {
  content: '✓';
  font-size: 1.2rem;
}

.progress-label {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-weight: 500;
}

.progress-step.active .progress-label {
  color: #fb8d48;
  font-weight: bold;
}

/* ==================== FOOTER ==================== */
.footer {
  background: rgba(0, 0, 0, 0.6);
  color: #FFD700;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 3px solid #FFD700;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 -4px 15px rgba(255, 215, 0, 0.2);
}

.footer a {
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  text-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

.footer a:hover {
  color: #FF0000;
  text-decoration: underline;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.4);
}

.footer p {
  margin: 0;
}

.footer .copyright {
  text-align: left;
}

.footer .credits {
  text-align: right;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ==================== BOUTONS DE PARTAGE ==================== */
.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #4267B2; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.copy { background: #6c757d; }
.share-btn.copy.copied { background: #28a745; }

/* ==================== FULLSCREEN OVERLAY ==================== */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  display: none;
  overflow: auto;
}

.fullscreen-overlay.active {
  display: block;
}

.fullscreen-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.close-fullscreen {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(245, 60, 59, 0.9);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.close-fullscreen:hover {
  background: rgba(251, 141, 72, 0.9);
  transform: scale(1.05);
}

/* ==================== MODAL DE BIENVENUE ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease-out;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.3), rgba(0, 0, 0, 0.95));
  border: 3px solid #FFD700;
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
  position: relative;
  animation: slideDown 0.4s ease-out;
  text-align: center;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #FFD700;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.close-modal:hover {
  color: #FF0000;
  transform: rotate(90deg);
}

.modal-content h2 {
  color: #FFD700;
  margin-bottom: 1rem;
}

.modal-content p {
  color: #fff;
  margin: 1rem 0;
  line-height: 1.6;
}

/* ==================== LOADER/SPINNER ==================== */
.loader {
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-top: 4px solid #FFD700;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-message {
  text-align: center;
  color: #FFD700;
  font-size: 1.1rem;
  margin: 1rem 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .test-box,
  .info-box,
  .membres-box,
  form {
    padding: 1.5rem;
  }

  button,
  .button,
  .cta {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .counter-number,
  .big-number {
    font-size: 2.5rem;
  }

  .main-nav {
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
  
  .footer .copyright,
  .footer .credits {
    text-align: center;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem 0.5rem;
  }

  .logo {
    max-width: 100px;
  }

  h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  label {
    font-size: 0.95rem;
    padding: 0.8rem;
  }

  .progress-circle {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .progress-label {
    font-size: 0.75rem;
  }
}