/* --- VARIABLES --- */
:root {
  --primary: #e5006d;
  --primary-hover: #c4005d;
  --white: #ffffff;
  --text-dark: #111;
  --text-light: #666;
  --border: #ddd;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background-color: transparent; 
  margin: 0; 
  padding: 0;
  color: var(--text-dark); 
  font-family: "Inter", sans-serif;
  width: 100%; 
  height: auto; 
  min-height: 0;
  overflow: hidden; /* Nécessaire pour l'iframe, le padding du container gère l'espace */
}

.container {
  width: 100%; 
  max-width: 800px; 
  margin: 0 auto;
  
  /* CORRECTION CLIPPING : Augmentation des marges internes */
  /* Cela laisse de la place pour que l'ombre ne soit pas coupée */
  padding: 20px; 
  
  position: relative; 
  padding-bottom: 20px;
}

/* --- LAYOUT DU FORMULAIRE --- */
.form-row {
  display: flex;
  gap: 20px; 
  margin-bottom: 15px;
}

.form-group {
  flex: 1; 
  display: flex;
  flex-direction: column;
  min-width: 0; 
}

.full-width {
  width: 100%;
}

/* --- TYPOGRAPHIE LABELS --- */
label {
  display: block; 
  font-family: "Bebas Neue", sans-serif; 
  font-size: 1.5rem; 
  color: #333;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.required { 
  color: var(--primary); 
  margin-left: 2px;
}

/* --- CHAMPS (INPUTS / SELECT / TEXTAREA) --- */
input, select, textarea {
  width: 100%; 
  padding: 12px; 
  border: 1px solid var(--border);
  border-radius: 6px; 
  font-family: "Inter", sans-serif; 
  font-size: 16px; 
  background: #fff; 
  transition: border 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
  color: #666;
  appearance: none;
  -webkit-appearance: none;
}

/* Petite flèche custom pour le select */
select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="%23333" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 30px;
}

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

/* --- FOCUS STATE (CORRIGÉ) --- */
input:focus, select:focus, textarea:focus {
  outline: none; 
  border-color: var(--primary);
  /* 10px de flou comme demandé, noir opaque */
  box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.45);
}

/* --- BOUTON SUBMIT --- */
.submit-container { 
  margin-top: 25px; 
  text-align: center;
}
.btn-submit {
  background-color: var(--primary); 
  color: white;
  font-family: "Bebas Neue", sans-serif; 
  font-size: 1.6rem;
  border: 2px solid transparent; 
  border-radius: 8px; 
  padding: 12px 40px;
  cursor: pointer; 
  width: 100%; 
  transition: all 0.3s;
  display: flex; 
  justify-content: center; 
  align-items: center; 
  gap: 10px;
}
.btn-submit:hover { 
  background-color: var(--primary-hover); 
}
.btn-submit:disabled { 
  background-color: #ccc; 
  cursor: not-allowed; 
}

/* Spinner de chargement */
.btn-spinner {
  width: 20px; height: 20px; border: 2px solid #fff;
  border-top: 2px solid transparent; border-radius: 50%;
  animation: spin 1s linear infinite; display: none;
}
.btn-submit.loading .btn-spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }


/* --- MODAL SUCCÈS --- */
.modal-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: white; z-index: 100; display: flex;
  justify-content: center; align-items: flex-start; padding-top: 40px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
}
.modal-content {
  background: white; padding: 30px; border-radius: 12px;
  border: 1px solid #eee; border-top: 6px solid var(--primary);
  text-align: center; max-width: 450px; width: 100%;
  transform: translateY(20px); transition: transform 0.4s;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.modal-overlay.visible { opacity: 1; visibility: visible; }
.modal-overlay.visible .modal-content { transform: translateY(0); }

.modal-icon { color: var(--primary); margin-bottom: 15px; }
.modal-icon svg { width: 50px; height: 50px; }
.modal-content h2 {
  font-family: "Bebas Neue", sans-serif; font-size: 2.2rem;
  margin: 0 0 10px 0; color: var(--text-dark);
}
.modal-content p { font-size: 1rem; color: #333; margin: 5px 0; }
.sub-text { font-size: 0.9rem; color: #666; margin-bottom: 25px; }

/* Boutons Modale */
.modal-actions {
  display: flex; flex-direction: column; gap: 15px; margin-top: 20px;
}
.btn-modal {
  display: flex; justify-content: center; align-items: center; width: 100%;
  padding: 12px 20px; border-radius: 6px; font-family: "Bebas Neue", sans-serif;
  font-size: 1.3rem; text-decoration: none; cursor: pointer;
  transition: all 0.3s ease; border: 2px solid var(--primary); box-sizing: border-box;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: white; color: var(--primary); }
.btn-secondary { background-color: white; color: var(--primary); }
.btn-secondary:hover { background-color: var(--primary); color: white; }

/* Mode Succès pour Iframe */
.container.success-mode #contactForm { display: none !important; }
.container.success-mode .modal-overlay {
  position: relative !important; height: auto !important;
  background: transparent !important; padding-top: 0;
}

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

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 600px) {
  .form-row { 
    flex-direction: column; 
    gap: 15px; 
  }
  
  .container {
    /* CORRECTION MOBILE : 15px minimum pour que l'ombre de 10px ne soit pas coupée */
    padding: 15px; 
  }

  .section-title {
      font-size: 1.2rem;
  }
}