/* 🖼️ Image de fond et overlay */
.bg-image,
.overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.overlay {
  background: rgba(0, 0, 0, 0.25);
}

/* 📦 Conteneur principal */
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5; /* 🔥 remet tout le contenu devant le fond */
}

/* 📄 Main */
main {
  flex: 1;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
  z-index: 5; /* 🔥 indispensable */
}

/* 📬 Mise en page côte à côte */
.contact-form,
.contact-info {
  flex: 1 1 400px;
  max-width: 500px;
  margin: 0;
  padding: 2rem;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  animation: fadeIn 0.6s ease;
}

/* 📇 Bloc contact spécifique */
.contact-info {
  background-color: rgba(252, 231, 190, 0.92);
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Titres */
.contact-form h2,
.contact-info h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #042e54;
  font-size: 1.4rem;
}

/* Formulaire */
form {
  width: 100%;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: bold;
}

input,
textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: rgba(255,255,255,0.85);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

input:focus,
textarea:focus {
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
  transform: scale(1.02);
}

textarea {
  height: 120px;
  resize: vertical;
}

/* Bouton */
button[type="submit"] {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: #47a02c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
  background-color: #2d6e1a;
  transform: translateY(-2px);
}

/* Messages */
.success-message {
  background: #c8f7c5;
  color: #2d7a2d;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: bold;
}

.error-message {
  background: #f7c5c5;
  color: #7a2d2d;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* 📇 Bloc contact */
.contact-person {
  margin-bottom: 1.5rem;
  text-align: justify;
  line-height: 1.4;
}

.contact-person h3 {
  text-align: center;
  margin-bottom: 0.5rem;
  color: #6e036e;
}

.contact-info h4 {
  margin-top: 2rem;
  font-weight: normal;
  text-align: left;
}

/* 📱 Responsive */
@media (max-width: 768px) {

  main {
    flex-direction: column;
    align-items: center;
  }

  .contact-form,
  .contact-info {
    width: 100%;
    max-width: 500px;
    margin: 1rem 0;
    padding: 1.5rem;
  }
}
