/* ========================================
   CONTACT TABS - COHÉRENT AVEC THÈME ARDENTYS
   ======================================== */

/* Variables reprises du thème principal */
:root {
  --primary-color: #c8ae7e; /* Couleur primaire du thème */
  --secondary-color: #5b64ae; /* Couleur secondaire du thème */
  --text-color: #555; /* Couleur texte principale */
  --text-dark: #222; /* Couleur titres */
  --border-color: #ced4da; /* Couleur bordures */
  --light-bg: #f6f5f4; /* Fond clair */
  --white: #fff;
  --danger-color: #dc3545; /* Couleur erreur */
  --success-color: #28a745; /* Couleur succès */
  --font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========================================
   HERO SECTION
   ======================================== */
.contact-hero {
  background: linear-gradient(
    135deg,
    rgba(200, 174, 126, 0.1) 0%,
    rgba(91, 100, 174, 0.05) 100%
  );
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.contact-hero h1 {
  font-family: var(--font-family);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.contact-hero .subtitle {
  font-size: 1.125rem;
  color: var(--text-color);
  font-weight: 400;
  margin-bottom: 0;
}

/* ========================================
   INFORMATION CARDS
   ======================================== */
.contact-info {
  margin-bottom: 3rem;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 174, 126, 0.15);
  border-color: var(--primary-color);
}

.info-card .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;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--white);
}

.info-card h3 {
  font-family: var(--font-family);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.info-card p {
  color: var(--text-color);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-card a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.info-card a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ========================================
   ONGLETS DE NAVIGATION
   ======================================== */
.contact-tabs-container {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 3rem;
}

.tab-navigation {
  display: flex;
  background: var(--light-bg);
  border-bottom: 1px solid var(--border-color);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tab-navigation li {
  flex: 1;
  margin: 0;
}

.tab-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}

.tab-btn:hover {
  background: rgba(200, 174, 126, 0.1);
  color: var(--text-dark);
}

.tab-btn.active {
  background: var(--white);
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

/* ========================================
   CONTENU DES ONGLETS
   ======================================== */
.tab-content {
  padding: 2.5rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-pane h2 {
  font-family: var(--font-family);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  text-align: center;
}

.tab-pane p {
  color: var(--text-color);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* ========================================
   STYLES DE FORMULAIRES - COHÉRENTS AVEC LE THÈME
   ======================================== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

/* Groupes de champs */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Labels */
.contact-form label {
  display: block;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Champs de saisie - Reprise des styles du thème */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="date"],
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  height: calc(1.8em + 0.8rem + 2px);
  padding: 0.4rem 1.33rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.8;
  color: #6e6e6e;
  background-color: var(--white);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  font-family: var(--font-family);
}

.contact-form textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

/* Focus states - Cohérents avec le thème */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  color: #6e6e6e;
  background-color: var(--white);
  border-color: #eee6d7;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(200, 174, 126, 0.25);
}

/* Placeholders */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6c757d;
  opacity: 1;
}

/* States disabled */
.contact-form input:disabled,
.contact-form select:disabled,
.contact-form textarea:disabled {
  background-color: #e9ecef;
  opacity: 1;
}

/* ========================================
   BOUTONS - COHÉRENTS AVEC LE THÈME
   ======================================== */
.contact-form .btn,
.contact-form input[type="submit"],
.contact-form button[type="submit"] {
  display: inline-block;
  font-weight: 600;
  color: #212529;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.4rem 1.33rem;
  font-size: 0.875rem;
  line-height: 1.8;
  border-radius: 2px;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-family);
  min-width: 140px;
}

.contact-form .btn:hover,
.contact-form input[type="submit"]:hover,
.contact-form button[type="submit"]:hover {
  color: #212529;
  background-color: #bd9d63;
  border-color: #b9985a;
}

.contact-form .btn:focus,
.contact-form input[type="submit"]:focus,
.contact-form button[type="submit"]:focus {
  box-shadow: 0 0 0 0.2rem rgba(175, 153, 113, 0.5);
  outline: 0;
}

.contact-form .btn:active,
.contact-form input[type="submit"]:active,
.contact-form button[type="submit"]:active {
  background-color: #b9985a;
  border-color: #b59251;
}

/* Bouton secondaire */
.contact-form .btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-color);
}

.contact-form .btn-secondary:hover {
  background-color: var(--light-bg);
  border-color: var(--primary-color);
  color: var(--text-dark);
}

/* ========================================
   MESSAGES DE VALIDATION
   ======================================== */
.form-message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 500;
}

.form-message.success {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #155724;
}

.form-message.error {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #721c24;
}

.form-message.info {
  background-color: rgba(200, 174, 126, 0.1);
  border: 1px solid rgba(200, 174, 126, 0.3);
  color: #856404;
}

/* Messages d'erreur de champs */
.field-error {
  color: var(--danger-color);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: block;
}

.contact-form .invalid input,
.contact-form .invalid select,
.contact-form .invalid textarea {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ========================================
   CONTACT FORM 7 COMPATIBILITY
   ======================================== */
.wpcf7-form {
  font-family: var(--font-family);
}

.wpcf7-form .form-group {
  margin-bottom: 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea,
.wpcf7-form select {
  display: block;
  width: 100%;
  height: calc(1.8em + 0.8rem + 2px);
  padding: 0.4rem 1.33rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.8;
  color: #6e6e6e;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.wpcf7-form textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: #eee6d7;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(200, 174, 126, 0.25);
}

.wpcf7-form input[type="submit"] {
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #212529;
  padding: 0.4rem 1.33rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.8;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  min-width: 140px;
}

.wpcf7-form input[type="submit"]:hover {
  background-color: #bd9d63;
  border-color: #b9985a;
}

/* Messages Contact Form 7 */
.wpcf7-response-output {
  padding: 1rem;
  border-radius: 4px;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.wpcf7-mail-sent-ok {
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #155724;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #721c24;
}

.wpcf7-spam-blocked {
  background-color: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #856404;
}

/* ========================================
   CARTE GOOGLE MAPS
   ======================================== */
.contact-map {
  margin-top: 3rem;
  padding: 2rem 0;
  background: var(--light-bg);
  border-top: 1px solid var(--border-color);
}

.map-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.map-container h2 {
  font-family: var(--font-family);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2rem;
}

.map-embed {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
}

.map-embed iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .contact-hero h1 {
    font-size: 2rem;
  }

  .contact-hero .subtitle {
    font-size: 1rem;
  }

  .tab-navigation {
    flex-direction: column;
  }

  .tab-btn {
    border-bottom: 1px solid var(--border-color);
    border-right: none;
  }

  .tab-btn.active {
    border-bottom-color: var(--border-color);
    border-left: 3px solid var(--primary-color);
  }

  .tab-content {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 1rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .info-card {
    padding: 1.5rem;
  }

  .map-embed iframe {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .contact-hero {
    padding: 2rem 0;
  }

  .contact-hero h1 {
    font-size: 1.75rem;
  }

  .tab-content {
    padding: 1rem;
  }

  .contact-form {
    padding: 0;
  }

  .info-card {
    padding: 1rem;
  }

  .info-card .icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* ========================================
   ANIMATIONS ET TRANSITIONS
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-pane.active {
  animation: fadeIn 0.3s ease-in-out;
}

.contact-form .btn:not(:disabled) {
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form .btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.contact-form .btn:not(:disabled):active {
  transform: translateY(0);
}

/* Loading state */
.contact-form .btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.contact-form .btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: #212529;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   ACCESSIBILITÉ
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible pour l'accessibilité */
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Amélioration du contraste pour les liens */
.info-card a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
