/* Styles pour formulaire Contact Form 7 */

/* Conteneur principal du formulaire */
.wpcf7-form {
  max-width: 800px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Style général pour tous les labels */
.wpcf7-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--wp--preset--color--primary);
}

/* Styles de base pour tous les champs */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  color: #444;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* États au survol pour les champs */
.wpcf7-form input[type="text"]:hover,
.wpcf7-form input[type="email"]:hover,
.wpcf7-form select:hover,
.wpcf7-form textarea:hover {
  border-color: #bbb;
}

/* États au focus pour les champs */
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
  outline: none;
}

/* Style spécifique pour les champs textarea */
.wpcf7-form textarea {
  height: 150px;
  resize: vertical;
  line-height: 1.5;
}

/* Style pour le champ select */
.wpcf7-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%23444" d="M0 0l6 6 6-6z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 30px;
}

/* Style pour le champ de téléchargement de fichier */
.wpcf7-form input[type="file"] {
  width: 100%;
  padding: 10px 0;
  font-size: 14px;
}

/* Conteneur personnalisé pour l'upload de fichier */
.wpcf7-form .file-upload-wrapper {
  position: relative;
  padding: 12px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  text-align: center;
  background-color: #f9f9f9;
  margin-top: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wpcf7-form .file-upload-wrapper:hover {
  border-color: #0073aa;
  background-color: #f5f5f5;
}

/* Style pour la case à cocher */
.wpcf7-checkbox {
  margin: 5px 0;
}

.wpcf7-checkbox .wpcf7-list-item {
  margin: 0;
  display: flex;
  align-items: flex-start;
}

.wpcf7-checkbox .wpcf7-list-item-label {
  font-size: 14px;
  padding-left: 8px;
  line-height: 1.4;
}

.wpcf7-checkbox input[type="checkbox"] {
  margin-top: 3px;
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #ccc;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.wpcf7-checkbox input[type="checkbox"]:checked {
  background-color: #0073aa;
  border-color: #0073aa;
}

.wpcf7-checkbox input[type="checkbox"]:checked::before {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Style pour le bouton d'envoi */
.wpcf7-submit {
  background-color: var(--wp--preset--color--dark-blue);
  color:var(--wp--preset--color--base);
  border: none;
  border-radius: 20px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 10px;
  text-align: center;
}

.wpcf7-submit:hover {
  background-color: var(--wp--preset--color--yellow);
  color:var(--wp--preset--color--dark-blue);
}

/* Disposition en deux colonnes (responsive) */
.form-row {
  margin-bottom: 20px;
}

.form-row.two-columns {
  display: flex;
  gap: 20px;
}

.form-row.two-columns > div {
  flex: 1;
}

/* Message d'erreur et de validation */
/* Message d'erreur sous les champs */
.wpcf7-not-valid-tip {
  background-color: rgba(255, 255, 255, 0.7);
  color: #dc3545;
  font-size: 13px;
  padding: 8px 12px;
  margin-top: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  font-weight: 500;
  line-height: 1.4;
  border-left: 3px solid #dc3545;
}

/* Ajout de l'icône de croix */
.wpcf7-not-valid-tip::before {
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-repeat: no-repeat;
  display: inline-block;
  flex-shrink: 0;
}

/* Style des champs avec erreur */
.wpcf7-form .wpcf7-not-valid {
  border-color: #dc3545;
  background-color: rgba(255, 255, 255, 0.9);
}

/* Focus sur les champs avec erreur */
.wpcf7-form .wpcf7-not-valid:focus {
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

/* Message d'erreur général */
.wpcf7 form.invalid .wpcf7-response-output {
  background-color: rgba(255, 255, 255, 0.7);
  border: none !important;
  border-left: 4px solid #dc3545 !important;
  color: #dc3545;
  padding: 12px 15px 12px 40px !important;
  border-radius: 4px;
  position: relative;
  font-weight: 500;
  margin-top: 25px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* Ajout d'une icône plus grande pour le message général */
.wpcf7 form.invalid .wpcf7-response-output::before {
  content: '';
  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='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* Animation subtile pour les messages d'erreur */
@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.wpcf7-not-valid-tip, 
.wpcf7 form.invalid .wpcf7-response-output {
  animation: errorShake 0.5s ease-in-out;
}



/* Section d'informations (RGPD et délai de réponse) */
.form-info {
  margin-top: 25px;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.6); /* Votre couleur white-60% */
  border-left: 3px solid #0073aa;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.form-info .response-time {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

/* Adaptation mobile */
@media (max-width: 767px) {
  .form-row.two-columns {
    flex-direction: column;
    gap: 20px;
  }
  
  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form select,
  .wpcf7-form textarea {
    font-size: 15px;
    padding: 10px 12px;
  }
  
  .wpcf7-submit {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
  }
}


/* Styles améliorés pour l'input file dans Contact Form 7 */

/* Cacher l'input file natif */
.wpcf7-form input[type="file"] {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

/* Conteneur personnalisé pour l'upload */
.file-upload-container {
  position: relative;
  margin-top: 10px;
  margin-bottom: 20px;
}

/* Style du label qui servira de bouton visuel */
.wpcf7-form .file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  color: #495057;
  border: 2px dashed #ced4da;
  border-radius: 8px;
  padding: 18px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: normal;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Icône d'upload */
.file-upload-label::before {
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
  width: 24px;
  height: 24px;
  margin-right: 10px;
  background-repeat: no-repeat;
  display: inline-block;
}

/* Effet au survol */
.wpcf7-form .file-upload-label:hover {
  background-color: #e9ecef;
  border-color: #0073aa;
  color: #0073aa;
}

.wpcf7-form .file-upload-label:hover::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230073aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

/* Zone affichant le nom du fichier sélectionné */
.file-name-display {
  margin-top: 8px;
  font-size: 14px;
  color: #495057;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 5px 10px;
  border-radius: 4px;
  display: none;
  word-break: break-all;
}

/* Style pour les erreurs */
.wpcf7-form .file-upload-container .wpcf7-not-valid-tip {
  margin-top: 8px;
}

/* Animation de l'état actif */
.wpcf7-form .file-upload-label:active {
  transform: translateY(1px);
}

/* Script JavaScript à ajouter à la page */