/* Join Page Specific Styles */

#join-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
}

.join-bg {
  position: absolute;
  inset: 0;
  background-color: var(--background);
  background-image: radial-gradient(hsla(225, 61%, 16%, 0.1) 1px, transparent 1px);
  background-size: 2rem 2rem;
  z-index: -1;
}

.join-shapes {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.join-shapes > div {
  position: absolute;
  border-radius: 50%;
}

.join-shapes .shape1 {
  top: -10%;
  left: -5%;
  width: 30vw;
  height: 30vw;
  background-color: hsla(225, 61%, 16%, 0.05);
  opacity: 0.5;
}

.join-shapes .shape2 {
  bottom: -10%;
  right: -5%;
  width: 35vw;
  height: 35vw;
  background-color: hsla(225, 61%, 16%, 0.05);
  opacity: 0.3;
}

.join-shapes .shape3 {
  top: 20%;
  right: 10%;
  width: 8rem;
  height: 8rem;
  border: 2px solid hsla(225, 61%, 16%, 0.2);
}

.join-container {
  max-width: 600px;
  margin: 0 auto;
}

.join-form-wrapper,
.success-wrapper {
  background-color: var(--card);
  border-radius: calc(var(--radius) * 2);
  padding: 3rem;
  box-shadow: 0 20px 50px hsla(0, 0%, 0%, 0.1);
  border: 1px solid hsla(225, 61%, 80%, 0.3);
}

.join-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.join-header h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.join-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid hsla(225, 61%, 80%, 0.5);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  background-color: var(--background);
  color: var(--foreground);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(225, 61%, 16%, 0.1);
}

.form-group input.error,
.form-group select.error {
  border-color: #ef4444;
}

.error-message {
  font-size: 0.75rem;
  color: #ef4444;
  display: none;
}

.error-message.show {
  display: block;
}

/* SECTION TYPE SELECTOR - 3 OPTIONS CÔTE À CÔTE */
.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.type-option {
  cursor: pointer;
}

.type-option input[type="radio"] {
  display: none;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border: 2px solid hsla(225, 61%, 80%, 0.5);
  border-radius: var(--radius);
  background-color: var(--background);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 140px;
}

.type-card svg {
  margin-bottom: 0.75rem;
  color: var(--primary);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.type-card span {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--foreground);
}

.type-card small {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
}

/* État hover */
.type-option:hover .type-card {
  border-color: var(--primary);
  background-color: hsla(225, 61%, 16%, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(225, 61%, 16%, 0.1);
}

.type-option:hover .type-card svg {
  opacity: 1;
  transform: scale(1.1);
}

/* État sélectionné */
.type-option input[type="radio"]:checked + .type-card {
  border-color: var(--primary);
  background-color: hsla(225, 61%, 16%, 0.05);
  box-shadow: 0 0 0 3px hsla(225, 61%, 16%, 0.1);
}

.type-option input[type="radio"]:checked + .type-card svg {
  opacity: 1;
  transform: scale(1.15);
}

.type-option input[type="radio"]:checked + .type-card span {
  color: var(--foreground);
}

.btn {
  width: 100%;
  margin-top: 0.5rem;
}

#submitBtn.loading .btn-text {
  display: none;
}

#submitBtn.loading .spinner {
  display: block;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
  margin: 0 auto;
}

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

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: -0.5rem;
}

/* Success Section */
.success-wrapper {
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}

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

.success-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  position: relative;
}

.checkmark-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s ease-out;
  box-shadow: 0 4px 20px hsla(225, 61%, 16%, 0.3);
}

.checkmark-icon {
  color: white;
  animation: checkmarkDraw 0.5s ease-out 0.3s both;
}

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

@keyframes checkmarkDraw {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.success-wrapper h2 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.success-wrapper p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  #join-hero {
    padding: 6rem 0 3rem;
  }

  .join-form-wrapper,
  .success-wrapper {
    padding: 2rem 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Mobile - 3 options en colonne */
  .type-selector {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .type-card {
    min-height: 100px;
    padding: 1.25rem 1rem;
  }

  .join-header h1 {
    font-size: 1.75rem;
  }

  .join-subtitle {
    font-size: 1rem;
  }
}

/* Tablette - 2 colonnes puis 1 en dessous */
@media (min-width: 769px) and (max-width: 1024px) {
  .type-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .type-option:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .join-form-wrapper,
  .success-wrapper {
    padding: 1.5rem 1rem;
  }

  .container {
    padding: 0 1rem;
  }
}
