/* Container principal */
.contact {
  min-height: 100vh;
  background: black;
  padding: 50px 20px;
}

/* Hero section */
.contact-hero {
  text-align: center;
  margin-bottom: 60px;
  padding-top: 40px;
}

.contact-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.contact-hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* Container principal */
.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

/* Section gauche - Informations de contact */
.contact-left {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  height: fit-content;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-details h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-details p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

/* Section droite - Formulaire */
.contact-right {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h2 {
  color: white;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.form-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

/* Rangée de formulaire */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Groupes de formulaire */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  color: white;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Styles des inputs */
.contact-input {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  position: relative;
}

.contact-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contact-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(78, 115, 223, 0.3);
}

.contact-input:valid {
  border-color: var(--secondary-color);
}

/* Animation de focus avec glow effect */
.form-group {
  position: relative;
}

.form-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 12px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  filter: blur(15px);
}

.form-group:focus-within::before {
  opacity: 0.3;
}

/* Select personnalisé */
select.contact-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  appearance: none;
}

select.contact-input option {
  background: #1a1a1a;
  color: white;
  padding: 10px;
}

/* Textarea */
textarea.contact-input {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Captcha */
.captcha-container {
  margin-bottom: 30px;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-top: 8px;
}

.captcha-question {
  color: white;
  font-weight: 500;
  min-width: 120px;
}

.captcha-answer {
  flex: 1;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
}

.captcha-answer::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.captcha-answer:focus {
  outline: none;
  border-color: var(--primary-color);
}

.captcha-answer.valid {
  border-color: #28a745 !important;
  background: rgba(40, 167, 69, 0.1);
  transition: all 0.3s ease;
}

.captcha-answer.error {
  border-color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.1);
  transition: all 0.3s ease;
}

.captcha-refresh {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.captcha-refresh:hover {
  background: var(--secondary-color);
  transform: rotate(180deg);
}

/* Messages d'erreur */
.form-error {
  display: block;
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 5px;
  margin-left: 5px;
}

/* Bouton d'envoi */
.form-actions {
  text-align: center;
  margin-top: 30px;
}

.contact-button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  border-radius: 50px;
  padding: 18px 40px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  justify-content: center;
}

.contact-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(78, 115, 223, 0.4);
}

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

.contact-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  transition: transform 0.3s ease;
}

.contact-button:hover .btn-icon {
  transform: translateX(5px);
}

/* Status du formulaire */
.form-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-status.success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #28a745;
  display: block;
}

.form-status.error {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #dc3545;
  display: block;
}

/* Animations et effets spéciaux */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 115, 223, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(78, 115, 223, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 115, 223, 0);
  }
}

.contact-button:hover {
  animation: pulse 1.5s infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}

/* Effet de loading pour le bouton */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fa-spinner {
  animation: spin 1s linear infinite;
}

/* Effet de slide-in pour les éléments */
.slide-in {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
}

.slide-in.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===============================
   AMÉLIORATIONS SYSTÈME V2
   =============================== */

/* Animations pour les statuts de formulaire */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes shake {
  0%,
  20%,
  40%,
  60%,
  80% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70% {
    transform: translateX(-5px);
  }
  90% {
    transform: translateX(5px);
  }
}

/* Amélioration des statuts de formulaire */
.form-status {
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.form-status.success::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s ease-out;
}

.form-status i {
  margin-right: 8px;
  font-size: 1.1em;
}

/* Amélioration des erreurs de champs */
.form-error:not(:empty) {
  opacity: 1;
  transform: translateY(0);
  animation: slideIn 0.3s ease-out;
}

.contact-input.error {
  animation: shake 0.5s ease-in-out;
}

/* Captcha amélioré */
.captcha-refresh:hover {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.5;
  }
}

/* Amélioration du bouton de soumission */
.contact-button {
  position: relative;
  overflow: hidden;
}

.contact-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.contact-button:hover::before {
  width: 300px;
  height: 300px;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

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