/* Réinitialisation */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Global Styles */
body {
  font-family: 'Silkscreen', cursive;
  background: linear-gradient(135deg, #e8f0ff, #f4f4f9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: #333;
  line-height: 1.6;
  font-size: 1rem; /* Ajustement de la taille pour Silkscreen */
}

/* Header Styles */
header {
  width: 100%;
  margin-bottom: 20px;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(to right, 
    rgba(255, 0, 0, 0.03), 
    rgba(255, 165, 0, 0.03), 
    rgba(255, 255, 0, 0.03), 
    rgba(0, 128, 0, 0.03), 
    rgba(0, 0, 255, 0.03), 
    rgba(75, 0, 130, 0.03), 
    rgba(238, 130, 238, 0.03));
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080) 1;
}

.logo h1 {
  font-size: 1.8rem;
  color: #0057ff;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links li a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  background-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080, #ff0000);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbow-animation 3s linear infinite;
}

.hero {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, 
    rgba(255, 0, 0, 0.6), 
    rgba(255, 165, 0, 0.6),
    rgba(255, 255, 0, 0.6),
    rgba(0, 255, 0, 0.6),
    rgba(0, 255, 255, 0.6),
    rgba(0, 0, 255, 0.6),
    rgba(238, 130, 238, 0.6)), 
    url('https://source.unsplash.com/1600x900/?pixel,ape') center/cover no-repeat;
  color: #fff;
  position: relative;
  background-size: 200% 200%, cover;
  animation: rainbow-bg-animation 20s linear infinite;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Overlay plus sombre pour assurer la lisibilité */
  z-index: 1;
}

.hero h2, .hero p {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* Ombre pour améliorer la lisibilité */
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9); /* Ombre plus forte pour le titre */
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 10px;
  border: 2px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080) 1;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
              0 0 30px rgba(255, 0, 0, 0.1),
              0 0 40px rgba(0, 255, 0, 0.1),
              0 0 50px rgba(0, 0, 255, 0.1);
  animation: glow 3s infinite alternate;
}

.hero p {
  font-size: 1.1rem;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  margin-top: 0.8rem;
  border: 1px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff) 1;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(255, 0, 0, 0.1),
              0 0 30px rgba(0, 255, 0, 0.1);
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(255, 0, 0, 0.1),
                0 0 40px rgba(0, 255, 0, 0.1),
                0 0 50px rgba(0, 0, 255, 0.1);
  }
  to {
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(255, 0, 0, 0.2),
                0 0 50px rgba(0, 255, 0, 0.2),
                0 0 60px rgba(0, 0, 255, 0.2);
  }
}

/* Container pour le formulaire */
.container {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  margin: 0 auto 40px auto;
  animation: fadeIn 0.8s ease-out;
  border-top: 5px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080) 1;
}

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

/* Titre de la section registration */
.container h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #0057ff;
  text-align: center;
}

/* Style du formulaire */
form {
  display: flex;
  flex-direction: column;
}

/* Labels avec bordure inférieure arc-en-ciel */
label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
  text-align: left;
  padding-bottom: 5px;
  border-bottom: 1px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff) 1;
  display: block;
}

/* Inputs et bouton */
input, button {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

input:focus {
  outline: none;
  border-color: transparent;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff) 1;
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(0,87,255,0.1);
}

/* Bouton de soumission */
button {
  background: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080);
  background-size: 200% auto;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
}

button:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,87,255,0.3);
}

button:active {
  transform: translateY(0);
}

/* Checkbox Container */
.checkbox-container {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 10px;
  width: auto;
  margin-top: 5px;
}

.checkbox-container label {
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-container a {
  color: #0057ff;
  text-decoration: none;
}

.checkbox-container a:hover {
  text-decoration: underline;
}

/* reCAPTCHA Container */
.recaptcha-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 480px) {
  .recaptcha-container {
    transform: scale(0.85);
    transform-origin: center;
  }
}

@media (max-width: 350px) {
  .recaptcha-container {
    transform: scale(0.75);
    transform-origin: center;
  }
}

/* Footer Styles */
footer {
  background: linear-gradient(to right,
    rgba(255, 0, 0, 0.9),
    rgba(255, 165, 0, 0.9),
    rgba(255, 255, 0, 0.9),
    rgba(0, 128, 0, 0.9),
    rgba(0, 0, 255, 0.9),
    rgba(75, 0, 130, 0.9),
    rgba(238, 130, 238, 0.9));
  color: #fff;
  text-align: center;
  padding: 1rem;
  width: 100%;
  margin-top: auto;
}

footer .social-links {
  margin-top: 0.5rem;
}

footer .social-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

footer .social-links a:hover {
  color: #1DA1F2;
}

footer .social-links img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
    margin: 0 15px 30px 15px;
  }
  
  .container h1 {
    font-size: 1.75rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
}

/* Messages d'erreur */
.error-message {
  background-color: #fff5f5;
  color: #e53e3e;
  padding: 12px;
  border-radius: 5px;
  margin-bottom: 20px;
  border-left: 4px solid #e53e3e;
  animation: fadeIn 0.3s ease-out;
}

.error-message.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* Message de succès */
.success-message {
  text-align: center;
  padding: 20px;
  animation: fadeIn 0.5s ease-out;
  border-radius: 10px;
  background: linear-gradient(135deg, 
    rgba(255, 0, 0, 0.05), 
    rgba(255, 165, 0, 0.05), 
    rgba(255, 255, 0, 0.05), 
    rgba(0, 128, 0, 0.05), 
    rgba(0, 0, 255, 0.05), 
    rgba(75, 0, 130, 0.05), 
    rgba(238, 130, 238, 0.05));
  border: 1px solid;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff) 1;
}

.success-message svg {
  margin-bottom: 20px;
  animation: checkmark 0.8s ease-in-out;
}

@keyframes checkmark {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.success-message h2 {
  background-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-animation 8s linear infinite;
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.success-message p {
  color: #4a5568;
  margin-bottom: 25px;
}

.back-home {
  display: inline-block;
  background: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080);
  background-size: 200% auto;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-home:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,87,255,0.3);
}

/* Spinner pour le chargement */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

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

/* Effet de focus amélioré pour les inputs */
.input-active input {
  border-color: #0057ff;
  box-shadow: 0 0 0 2px rgba(0,87,255,0.2);
}

/* Liens dans le formulaire */
form a, .checkbox-container a {
  background-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  text-decoration: none;
  transition: background-position 0.3s ease;
}

form a:hover, .checkbox-container a:hover {
  background-position: right center;
  text-decoration: underline;
}

/* Rainbow Text Effect */
.rainbow-text {
  background-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080, #ff0000);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbow-animation 6s linear infinite;
  font-weight: 700;
  text-shadow: none;
}

.hero .rainbow-text {
  text-shadow: none;
  font-weight: 700;
}

.logo .rainbow-text {
  color: transparent;
}

/* Ajout d'une classe pour les sections avec fond arc-en-ciel */
.rainbow-section {
  background: linear-gradient(135deg, 
    rgba(255, 0, 0, 0.05), 
    rgba(255, 165, 0, 0.05), 
    rgba(255, 255, 0, 0.05), 
    rgba(0, 128, 0, 0.05), 
    rgba(0, 0, 255, 0.05), 
    rgba(75, 0, 130, 0.05), 
    rgba(238, 130, 238, 0.05));
  background-size: 200% 200%;
  animation: rainbow-bg-animation 10s linear infinite;
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, 
    #ff00ff, #ff0080) 1;
}

@keyframes rainbow-animation {
  to {
    background-position: 200% center;
  }
}

@keyframes rainbow-bg-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes neon-pulse {
  from {
    text-shadow: 0 0 1px #0c86ff,
                 0 0 2px #0c86ff;
  }
  to {
    text-shadow: 0 0 2px #0c86ff,
                 0 0 4px #0c86ff;
  }
}

/* Effet arc-en-ciel sur les champs texte */
input[type="text"] {
  border: 1px solid #ced4da;
  border-radius: 5px;
  transition: all 0.3s ease;
}

input[type="text"]:hover {
  border-color: transparent;
  border-image: linear-gradient(to right, 
    #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, 
    #00ff80, #00ffff, #0080ff, #0000ff) 1;
  border-width: 1px;
  border-style: solid;
}
