/* ========================================
   FORM - Styles uniformes pour tous les formulaires
   ======================================== */

/* Sections avec bordure colorée */
.section {
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  padding: 20px;
  border-radius: 10px;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.section:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.section > label {
  color: white;
  margin-bottom: 12px;
}

/* Textarea avec fond blanc */
.section > textarea {
  background: white;
  border-radius: 8px;
  padding: 14px;
  border: 2px solid var(--border);
  color: #1a1a1a;
  width: 100%;
  min-height: 250px;
  resize: vertical;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.3s;
}

/* Pour les sections sans fond blanc */
.section.no-white-bg > input,
.section.no-white-bg > textarea {
  background: #f5f5f5;
}

/* Inputs texte */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.3s;
  background: #f5f5f5;
  color: #1a1a1a;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
  background: #ffffff;
}

/* Labels */
label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Astérisques de champs requis */
label .required,
h3 .required {
  color: #fca5a5;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
}

h3 .required {
  font-size: 22px;
}

/* Textes d'aide en rouge avec contraste */
label .helper-text {
  color: #fca5a5;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  text-transform: lowercase;
  background: rgba(220, 38, 38, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Radio buttons et checkboxes */
input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: normal;
  text-transform: none;
}

/* Boutons */
button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: white;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, var(--primary-3) 0%, var(--primary) 100%);
}

/* Conteneur de formulaire */
.form-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Info box */
.info-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-left: 4px solid var(--primary-3);
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.info-box p {
  color: white;
  font-size: 16px;
  line-height: 1.6;
}

.info-box strong {
  color: white;
  font-weight: 700;
  font-size: 17px;
}

/* Emails prédéfinis cliquables */
.email-preset {
  display: inline-block;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  text-transform: lowercase;
}

.email-preset:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Section documents */
.docs-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.docs-section h3 {
  color: white;
  font-size: 17px;
  margin-bottom: 15px;
  font-weight: 600;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  background: var(--card);
  padding: 20px;
  border-radius: 8px;
  border: 2px solid var(--border);
}

.docs-grid .section {
  margin-bottom: 0;
  border: 2px solid var(--border);
}

.docs-grid label {
  font-size: 13px;
  text-transform: uppercase;
}

.docs-grid .radio-group {
  margin-top: 6px;
}

.docs-grid .radio-group label {
  font-size: 12px;
}

/* Messages d'erreur */
.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  border-left: 4px solid #ef4444;
}

/* Résultat */
.result {
  display: none;
  margin-top: 30px;
  padding: 25px;
  background: var(--bg-muted);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

.result h2 {
  color: var(--text);
  margin-bottom: 15px;
  font-size: 18px;
}

.result-content {
  background: var(--bg);
  padding: 20px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.5;
  border: 1px solid var(--border);
}

/* Boutons spécialisés */
.copy-btn {
  background: linear-gradient(135deg, #6B8E23 0%, #556B2F 100%);
  margin-top: 15px;
}

.copy-btn:hover {
  background: linear-gradient(135deg, #556B2F 0%, #3F5221 100%);
}

.success-msg {
  display: none;
  color: #10b981;
  margin-top: 10px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 10px;
  border-radius: 6px;
  border-left: 4px solid #10b981;
}

/* Boutons IA */
.ai-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.ai-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
}

.ai-btn.lumo {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.ai-btn.lumo:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.ai-btn.chatgpt {
  background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%);
}

.ai-btn.chatgpt:hover {
  background: linear-gradient(135deg, #0d8a6a 0%, #0a6e54 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 163, 127, 0.4);
}

.ai-btn.claude {
  background: linear-gradient(135deg, #b4886d 0%, #9a7058 100%);
}

.ai-btn.claude:hover {
  background: linear-gradient(135deg, #9a7058 0%, #805a43 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 136, 109, 0.4);
}

.ai-btn.mistral {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.ai-btn.mistral:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* Bouton flottant de réinitialisation */
.floating-reset {
  position: fixed;
  bottom: 30px;
  right: 90px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  transition: all 0.3s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-reset:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
  .form-container {
    padding: 20px;
  }
  
  .ai-buttons {
    flex-direction: column;
  }
  
  .ai-btn {
    min-width: 100%;
  }
  
  .floating-reset {
    bottom: 20px;
    right: 20px;
  }
}
