/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --blanc-color: #EDECEC;
  --noir-color: #27131F;
  --jaune-color: #F08921;
  --rouge-color: #BB1F30;
  --beige-color: #DA6358;
  --rouge-rose-color: #C42139;
  --text-muted: rgba(237, 236, 236, 0.8);
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  position: relative;
  overflow-x: hidden;
  background-color: var(--blanc-color);
  color: var(--noir-color);
  min-height: 100vh;
}

/* Texture de fond */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("Texture.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ==========================================================================
   CONTENEUR PRINCIPAL (FLUIDE & RESPONSIVE)
   ========================================================================== */
.container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 50%;
  margin: 0 auto;
  background:
    radial-gradient(circle at top left, var(--rouge-color) 0%, transparent 100%),
    radial-gradient(circle at top right, var(--jaune-color) 0%, transparent 100%),
    radial-gradient(circle at bottom left, var(--beige-color) 0%, transparent 100%),
    radial-gradient(circle at bottom right, var(--rouge-rose-color) 0%, transparent 100%);
  background-color: var(--beige-color);
  color: var(--blanc-color);
  border-radius: 15px;
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 
    rgba(0, 0, 0, 0.25) 0px 54px 55px, 
    rgba(0, 0, 0, 0.12) 0px -12px 30px, 
    rgba(0, 0, 0, 0.12) 0px 4px 6px, 
    rgba(0, 0, 0, 0.17) 0px 12px 13px, 
    rgba(0, 0, 0, 0.09) 0px -3px 5px;
  animation: fadeIn 1s ease-out;
}

.container::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("Texture.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  mix-blend-mode: overlay;
  border-radius: 15px;
  pointer-events: none;
}

.container > * {
  position: relative;
  z-index: 3;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   TYPOGRAPHIE RESPONSIVE (TITRE & SOUS-TITRE)
   ========================================================================== */
h1 {
  /* clamp(taille_min, taille_souhaitée, taille_max) */
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
  color: var(--blanc-color);
  font-family: 'Inter', sans-serif;
  position: relative;
  margin: 0 0 1rem 0;
  padding: 0;
  z-index: 1;
  text-transform: uppercase;
  line-height: 1.15;
}

/* Effet Outline sur h1 */
h1::after {
  font-family: 'Inter', sans-serif;
  content: attr(data-text);
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 0.5px var(--blanc-color);
  white-space: pre-wrap;
  width: 100%;
  pointer-events: none;
}

.subtitle {
  color: var(--blanc-color);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ==========================================================================
   FORMULAIRE DE CONTACT
   ========================================================================== */
.contact-form {
  margin: 0 auto 2rem auto;
  font-family: 'Inter', sans-serif;
  color: var(--blanc-color);
  text-align: left;
  width: 100%;
}

.contact-form .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-form .form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form .full-width {
  margin-bottom: 30px;
}

.contact-form label {
  font-size: 0.95rem;
  font-weight: 400;
}

.contact-form label a {
  color: var(--blanc-color);
  font-weight: bold;
  text-decoration: underline;
}

.contact-form .input-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  position: relative;
  z-index: 2;
  width: 100%;
  background-color: var(--blanc-color);
  border: none;
  border-radius: 5px;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--noir-color);
  outline: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 8em;
}

.contact-form .input-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate(4px, 4px);
  z-index: 1;
  background-color: transparent;
  border: 1px solid var(--blanc-color);
  border-radius: 5px;
  pointer-events: none;
}

/* Checkbox */
.contact-form .form-checkbox {
  display: flex;
  align-items: flex-start; /* Aligné en haut si le texte fait plusieurs lignes */
  gap: 12px;
  margin-bottom: 30px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.contact-form input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background-color: var(--blanc-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-form input[type="checkbox"]:checked {
  background-color: var(--noir-color);
}

.contact-form input[type="checkbox"]:checked::before {
  content: "✓";
  color: var(--blanc-color);
  font-size: 14px;
  font-weight: bold;
}

/* Bouton Submit */
.contact-form .form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-form button[type="submit"] {
  position: relative;
  background-color: var(--blanc-color);
  color: var(--noir-color);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 45px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  width: auto;
  max-width: 100%;
}

.contact-form button[type="submit"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate(4px, 4px);
  z-index: -1;
  background-color: transparent;
  border: 1px solid var(--blanc-color);
  border-radius: 5px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-form button[type="submit"]:hover {
  transform: translate(2px, 2px);
  background-color: var(--noir-color);
  color: var(--blanc-color);
}

.contact-form button[type="submit"]:hover::after {
  transform: translate(2px, 2px);
  border-color: var(--noir-color);
}

.contact-form button[type="submit"]:active {
  transform: translate(4px, 4px);
}

.contact-form button[type="submit"]:active::after {
  transform: translate(0px, 0px);
}

/* ==========================================================================
   ANIMATIONS D'ERREUR & ÉTATS DE VALIDATION
   ========================================================================== */
.contact-form .form-checkbox.animating-error input[type="checkbox"],
.contact-form .form-checkbox.animating-error label,
.contact-form .input-wrapper input.animating-error,
.contact-form .input-wrapper textarea.animating-error {
  animation: wiggle-error 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes wiggle-error {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  35% { transform: translateX(8px); }
  50% { transform: translateX(-6px); }
  65% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}

#submitBtn.success {
  background-color: var(--blanc-color) !important;
  color: var(--noir-color) !important;
  border-color: var(--blanc-color) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: default;
}

.contact-form button[type="submit"].success::after {
  border-color: var(--blanc-color) !important;
}

#submitBtn.loading {
  opacity: 0.7;
  cursor: wait;
}

.contact-form .input-wrapper input.invalid,
.contact-form .input-wrapper textarea.invalid {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23ff3333' d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px 20px;
  padding-right: 40px !important;
}

.contact-form .input-wrapper input#email.invalid {
  border-color: var(--rouge-color);
}

.contact-form .input-wrapper textarea.invalid {
  background-position: right 10px top 10px;
}

/* ==========================================================================
   INFOS DE CONTACT & RÉSEAUX
   ========================================================================== */
.info-section {
  border-top: 1px solid rgba(237, 236, 236, 0.15);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-details a {
  color: var(--blanc-color);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word; /* Évite qu'un long e-mail sorte de l'écran sur mobile */
}

.contact-details a:hover {
  color: var(--jaune-color);
}

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* S'adapte si beaucoup de boutons */
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-btn {
  color: var(--blanc-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(237, 236, 236, 0.08);
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.social-btn:hover {
  background: rgba(240, 137, 33, 0.2);
  color: var(--jaune-color);
}

/* ==========================================================================
   MEDIA QUERIES (ADAPTATION MOBILES ET TABLETTES)
   ========================================================================== */

/* Tablettes et petits écrans (< 768px) */
@media (max-width: 768px) {
  body {
    padding: 1.5rem 0.75rem;
  }

  .container {
    padding: 2rem 1.25rem;
    border-radius: 12px;
    max-width: 90%;
  }
}

/* Smartphones (< 580px) */
@media (max-width: 580px) {
  .contact-form .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .contact-form button[type="submit"] {
    width: 100%; /* Le bouton prend toute la largeur sur mobile */
    padding: 14px 20px;
  }

  .socials {
    gap: 0.5rem;
  }

  .social-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Très petits smartphones (< 380px) */
@media (max-width: 380px) {
  .container {
    padding: 1.5rem 1rem;
    max-width: 95%;
  }

  .contact-form label,
  .contact-form .form-checkbox {
    font-size: 0.85rem;
  }
}