/* ===== FORMULAIRE CRÉDIT SOLAIRE ===== */

/* ===== EN-TÊTE OFFICIEL ===== */
.credit-entete {
  background: white;
  border-radius: 24px;
  padding: 28px 36px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 8px 30px rgba(11, 26, 46, 0.06);
  border-left: 6px solid #ffd966;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

/* Effet de fond subtil */
.credit-entete::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 217, 102, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Groupe de logos */
.credit-entete-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.credit-entete-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #0b1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #ffd966;
  box-shadow: 0 4px 14px rgba(11, 26, 46, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.credit-entete-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 217, 102, 0.3);
}

.credit-entete-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.credit-entete-logo-sep {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffd966;
  opacity: 0.8;
  user-select: none;
}

/* Texte de l'en-tête */
.credit-entete-text {
  flex: 1 1 280px;
  text-align: center;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

.credit-entete-text h2 {
  font-size: 1.35rem;
  color: #0b1a2e;
  margin-bottom: 8px;
  letter-spacing: 0.6px;
  font-weight: 700;
  line-height: 1.4;
}

.credit-entete-text h2 .entete-x {
  color: #ffd966;
  font-weight: 400;
  margin: 0 4px;
}

.credit-entete-text p {
  color: #4a5b6e;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.6;
}

.credit-entete-text p i {
  color: #ffd966;
  margin-right: 4px;
}

.credit-entete-text p .sep {
  color: #dce4ec;
  font-weight: 300;
}

/* Badge numéro / formulaire */
.credit-entete-num {
  background: linear-gradient(135deg, #0b1a2e 0%, #1a2f4a 100%);
  color: #ffd966;
  padding: 14px 26px;
  border-radius: 16px;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(11, 26, 46, 0.2);
  border: 1px solid rgba(255, 217, 102, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.credit-entete-num:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 217, 102, 0.25);
}

.credit-entete-num strong {
  display: block;
  font-size: 0.72rem;
  color: #b8c9dd;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
  font-weight: 600;
}

.credit-entete-num span {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffd966;
}

/* Intro */
.credit-intro {
  background: white;
  border-radius: 24px;
  padding: 24px 30px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  border-left: 6px solid #ffd966;
  font-size: 1rem;
  line-height: 1.7;
}

/* Formulaire */
.credit-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.credit-section {
  background: white;
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
  border: 1px solid #edf2f7;
}

.credit-section-title {
  font-size: 1.2rem;
  color: #0b1a2e;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 3px solid #ffd966;
  display: inline-block;
  font-weight: 600;
}
.credit-section-title i {
  color: #ffd966;
  margin-right: 8px;
}

.credit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
}
.credit-row:last-child {
  margin-bottom: 0;
}
.credit-field {
  display: flex;
  flex-direction: column;
}
.credit-field.full-width {
  grid-column: 1 / -1;
}

.credit-field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0b1a2e;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.credit-field .required {
  color: #b22222;
  margin-left: 3px;
}

.credit-field input,
.credit-field select,
.credit-field textarea {
  padding: 13px 18px;
  border-radius: 14px;
  border: 1.5px solid #dce4ec;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0b1a2e;
  transition: 0.25s ease;
  background: #fbfcfe;
  width: 100%;
}
.credit-field input:focus,
.credit-field select:focus,
.credit-field textarea:focus {
  outline: none;
  border-color: #ffd966;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 217, 102, 0.15);
}
.credit-field textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}
.credit-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230b1a2e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.credit-help {
  display: block;
  font-size: 0.8rem;
  color: #6b7b8c;
  margin-top: 6px;
  font-style: italic;
}
.credit-help i {
  color: #ffd966;
  margin-right: 4px;
}

/* ===== CASE DE CONSENTEMENT ===== */
.check-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: #4a5b6e;
  line-height: 1.6;
  cursor: pointer;
  font-weight: 400;
}
.check-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: #0b1a2e;
  cursor: pointer;
}

/* Actions */
.credit-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
}
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: 0.3s ease;
  font-family: inherit;
}
.btn-primary {
  background: #0b1a2e;
  color: #ffd966;
}
.btn-primary:hover {
  background: #ffd966;
  color: #0b1a2e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 217, 102, 0.35);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: #eef3f9;
  color: #0b1a2e;
}
.btn-secondary:hover {
  background: #dce4ec;
}

/* Statut */
.form-status {
  display: none;
  padding: 16px 22px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}
.form-status.success {
  display: block;
  background: #e6f9ee;
  color: #128C7E;
  border-left: 5px solid #25d366;
}
.form-status.error {
  display: block;
  background: #fde8e8;
  color: #b22222;
  border-left: 5px solid #b22222;
}
.form-status.loading {
  display: block;
  background: #fff8e1;
  color: #8a6d00;
  border-left: 5px solid #ffd966;
}

/* Responsive */
@media (max-width: 700px) {
  .credit-entete {
    padding: 22px 20px;
    gap: 18px;
    flex-direction: column;
    text-align: center;
  }
  .credit-entete-logos {
    justify-content: center;
    width: 100%;
  }
  .credit-entete-logo {
    width: 64px;
    height: 64px;
  }
  .credit-entete-text h2 {
    font-size: 1.15rem;
  }
  .credit-entete-text p {
    font-size: 0.85rem;
    flex-direction: column;
    gap: 4px;
  }
  .credit-entete-num {
    align-self: stretch;
    width: 100%;
  }
  .credit-section {
    padding: 22px 20px;
  }
  .credit-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .credit-actions {
    justify-content: stretch;
  }
  .btn-primary,
  .btn-secondary {
    flex: 1;
    justify-content: center;
  }
}