:root {
  --bg-body: #fff2beff;
  --bg-card: #ffffff;
  --primary: #ffe066;
  --primary-hover: #ffd138;
  --text-main: #222;
  --text-muted: #666;
  --border-card: rgba(255, 224, 102, 0.3);
  --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.08);
  --radius-card: 18px;
  --radius-input: 7px;
  --radius-btn: 10px;
  --input-bg: #f0f0f0;
  --input-focus-bg: #fff8df;
  --input-focus-shadow: 0 0 0 2px rgba(255, 224, 102, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--bg-body);
  font-family: "Poppins", sans-serif;
  color: var(--text-main);
  margin: 0;
  text-align: center;
  height: 100%;
}

.contact-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 14px;
}

.contact-container {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  width: min(1000px, 95%);
  padding: 38px 46px 42px;
  border: 1px solid var(--border-card);
  position: relative;
  text-align: left;
}

.grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr 1.2fr;
  align-items: start;
}

@media (max-width: 800px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  text-align: center;
  align-items: center;
}

.intro h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.contact-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Formulaire */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-main);
}

/* Inputs & Textarea (Style Connexion) */
input,
select,
textarea {
  background: var(--input-bg);
  border: none;
  border-radius: var(--radius-input);
  padding: 11px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  font-family: inherit;
  color: var(--text-main);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--input-focus-bg);
  box-shadow: var(--input-focus-shadow);
}

/* Bouton envoyer (Style Connexion) */
.btn-contact {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  width: 100%;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  color: #222;
}

.btn-contact:hover {
  background: var(--primary-hover);
}

/* Effet sheen supprimé */

/* Messages */
.form-message {
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 15px;
  text-align: center;
  font-size: 0.9rem;
}

.form-message.success {
  background: #dbffe4;
  color: #0c7e2c;
}

.form-message.error {
  background: #ffe1e1;
  color: #a00000;
}

/* Champs requis */
.required {
  color: #a00000;
  font-weight: bold;
  margin-left: 3px;
}

.small-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* Responsive Mobile */
@media (max-width: 520px) {
  .contact-container {
    padding: 24px 20px;
    width: 95%;
  }

  .intro h1 {
    font-size: 1.6rem;
  }
}

/* Messages d’erreur sous champs (JS) */
.error-msg {
  color: #a00000;
  font-size: 0.85rem;
  margin-top: 5px;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
  text-align: left;
}

[aria-invalid="true"] {
  box-shadow: 0 0 0 2px rgba(160, 0, 0, 0.2);
  background: #fff5f5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
