/* Page Contact - fond image, overlay, cards */
.contact-page-section {
  position: relative;
  padding: 50px 0 70px;
  min-height: 60vh;
}

.contact-page-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/it_service/slide1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  z-index: 0;
}

.contact-page-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(224, 246, 255, 0.85) 0%, rgba(176, 224, 230, 0.9) 100%);
  z-index: 1;
}

.contact-page-section .container {
  position: relative;
  z-index: 2;
}

/* Cards avec effet soft */
.contact-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 82, 118, 0.12);
  padding: 28px 24px;
  height: 100%;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  border: 1px solid rgba(26, 82, 118, 0.08);
}

.contact-card:hover {
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.18);
  transform: translateY(-2px);
}

.contact-card .contact-block-title {
  color: #1a5276;
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.contact-card .contact-address,
.contact-card .info_cont p {
  color: #444;
}

.contact-card .information_bottom {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.contact-card .information_bottom:last-of-type {
  border-bottom: none;
}

.contact-card .icon_bottom {
  color: #1a5276;
}

.contact-card .icon_bottom i {
  font-size: 1.2rem;
}

/* Formulaire dans la card */
.contact-form-card {
  position: relative;
}

.contact-form-card .form_section {
  position: relative;
}

.contact-form-intro {
  margin-bottom: 1.5rem;
  color: #555;
}

/* Grille formulaire responsive */
.contact-form-row {
  margin-left: -10px;
  margin-right: -10px;
}

.contact-form-row > [class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: 1rem;
}

.contact-form-submit-wrap {
  margin-top: 0.5rem;
  margin-bottom: 0;
  text-align: left;
}

@media (max-width: 991px) {
  .contact-page-section {
    padding: 30px 0 50px;
  }
  .contact-card {
    padding: 22px 18px;
  }
  .contact-form-row > .contact-form-group.col-md-6 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 767px) {
  .contact-page-section .row.align-items-stretch {
    flex-direction: column;
  }
  .contact-page-section .col-lg-5,
  .contact-page-section .col-lg-7 {
    margin-bottom: 1rem;
  }
  .contact-card {
    padding: 20px 16px;
    border-radius: 12px;
  }
  .contact-form-row {
    margin-left: -8px;
    margin-right: -8px;
  }
  .contact-form-row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 0.875rem;
  }
  .contact-form-submit-wrap {
    text-align: center;
    margin-top: 0.25rem;
  }
  .contact-form-card .main_bt {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 575px) {
  .contact-page-section {
    padding: 20px 0 40px;
  }
  .contact-form-row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Groupes de champs + erreurs */
.contact-form-group {
  position: relative;
}

.contact-form-group .field_custom {
  width: 100%;
  display: block;
}

.contact-form-group .field-error {
  display: block;
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 4px;
  min-height: 1.2em;
}

.contact-form-group.is-invalid .field_custom {
  border-color: #c0392b;
  background-color: rgba(192, 57, 43, 0.04);
}

.contact-form-group.is-invalid .field_custom:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.2);
}

.contact-form-group.is-valid .field_custom {
  border-color: #27ae60;
}

.contact-card .field_custom {
  border-radius: 10px;
  border: 1px solid rgba(26, 82, 118, 0.2);
  padding: 12px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card .field_custom:focus {
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
  outline: none;
}

.contact-card .field_custom::placeholder {
  color: #888;
}

textarea.field_custom {
  resize: vertical;
  min-height: 100px;
}

.contact-card .main_bt {
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card .main_bt:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 82, 118, 0.35);
}

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

/* Loader overlay sur le formulaire */
.contact-form-loader {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  z-index: 10;
  align-items: center;
  justify-content: center;
}

.contact-form-loader.is-active {
  display: flex;
}

.contact-form-loader::after {
  content: '';
  width: 44px;
  height: 44px;
  border: 3px solid rgba(26, 82, 118, 0.2);
  border-top-color: #1a5276;
  border-radius: 50%;
  animation: contact-form-spin 0.8s linear infinite;
}

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

/* Toasts */
.contact-toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}

@media (max-width: 575px) {
  .contact-toast-container {
    left: 16px;
    right: 16px;
    top: 80px;
    max-width: none;
  }
}

.contact-toast {
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: contact-toast-in 0.35s ease;
}

@keyframes contact-toast-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.contact-toast--success {
  background: #27ae60;
  color: #fff;
}

.contact-toast--error {
  background: #c0392b;
  color: #fff;
}

.contact-toast__icon {
  flex-shrink: 0;
  font-size: 1.35rem;
}

.contact-toast__text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Masquer visuellement tout en restant accessible */
.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;
}

/* Section CTA "Demandez un devis" en card */
.contact_us_section {
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(26, 82, 118, 0.12);
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(26, 82, 118, 0.08);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.contact_us_section:hover {
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.18);
  transform: translateY(-2px);
}

/* Bannière contact avec léger overlay */
#inner_banner.inner_banner_section {
  position: relative;
}

#inner_banner.inner_banner_section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(26, 82, 118, 0.75) 0%, rgba(26, 82, 118, 0.5) 100%);
  z-index: 0;
}

#inner_banner .container {
  position: relative;
  z-index: 1;
}

#inner_banner .page-title,
#inner_banner .breadcrumb,
#inner_banner .breadcrumb a {
  color: #fff !important;
}

#inner_banner .breadcrumb > .active {
  color: rgba(255,255,255,0.9) !important;
}

/* Message succès/erreur formulaire */
#form-result .error_message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 12px;
}

#form-result #success_page {
  background: #d4edda;
  color: #155724;
  padding: 20px;
  border-radius: 10px;
  margin-top: 12px;
}

#form-result #success_page h1 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
