/*
Theme Name: LaToileScoute
Theme URI: https://www.latoilescoute.net
Description: Thème classique de LaToileScoute enfant de Twenty Twenty Four
Author: LaToileScoute
Author URI: https://www.latoilescoute.net
Template: twentytwentyfour
Version: 1.0.0
*/

/* ==========================================
   Formulaire de Contact - LaToileScoute
   ========================================== */

/* Container du formulaire */
.wpcf7-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Labels */
.wpcf7-form label {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d3748;
  line-height: 1.5;
}

/* Styles communs pour inputs, select et textarea */
.wpcf7-form-control {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1a202c;
  background-color: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.wpcf7-form-control:hover {
  border-color: #cbd5e0;
}

.wpcf7-form-control:focus {
  outline: none;
  border-color: #667eea;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* Placeholder */
.wpcf7-form-control::placeholder {
  color: #a0aec0;
}

/* Select spécifique */
.wpcf7-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
  cursor: pointer;
}

/* Textarea */
.wpcf7-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

/* Bouton d'envoi */
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 2rem;
  margin-top: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.wpcf7-submit:active {
  transform: translateY(0);
}

/* Spinner de chargement */
.wpcf7-spinner {
  display: none;
  width: 20px;
  height: 20px;
  margin-left: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.wpcf7-form.submitting .wpcf7-spinner {
  display: inline-block;
}

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

/* Messages de réponse */
.wpcf7-response-output {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
}

.wpcf7-form.sent .wpcf7-response-output {
  background-color: #c6f6d5;
  color: #276749;
  border: 1px solid #9ae6b4;
}

.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output {
  background-color: #fed7d7;
  color: #c53030;
  border: 1px solid #fc8181;
}

/* Validation des champs */
.wpcf7-not-valid {
  border-color: #fc8181 !important;
  background-color: #fff5f5 !important;
}

.wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #e53e3e;
}

/* Masquer les champs cachés */
.hidden-fields-container {
  display: none;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 640px) {
  .wpcf7-form {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
  }

  .wpcf7-form-control {
    padding: 0.75rem;
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  .wpcf7-submit {
    padding: 0.875rem 1.5rem;
  }
}